Matthias Krüger aba9fb4696
Rollup merge of #110877 - compiler-errors:binop-err, r=cjgillot
Provide better type hints when a type doesn't support a binary operator

For example, when checking whether `vec![A] == vec![A]` holds, we first evaluate the LHS's ty, then probe for any `PartialEq` implementations for that. If none is found, we report an error by evaluating `Vec<A>: PartialEq<?0>` for fulfillment errors, but the RHS is not yet evaluated and remains an inference variable `?0`!

To fix this, we evaluate the RHS and equate it to that RHS infer var `?0`, so that we are able to provide more detailed fulfillment errors for why `Vec<A>: PartialEq<Vec<A>>` doesn't hold (namely, the nested obligation `A: PartialEq<A>` doesn't hold).

Fixes #95285
Fixes #110867
2023-04-28 22:56:44 +02:00
..
2023-04-03 09:24:11 +02:00
2023-04-25 19:53:09 +00:00
2023-04-03 09:24:11 +02:00
2023-04-25 19:53:09 +00:00
2023-04-16 23:09:57 +00:00
2023-04-03 09:24:11 +02:00
2023-04-25 19:53:09 +00:00
2023-04-20 15:06:17 -03:00
2023-04-17 16:09:18 -04:00
2023-04-24 16:16:14 +02:00
2023-04-25 19:53:09 +00:00
2023-04-22 01:13:54 +00:00
2023-04-25 19:53:09 +00:00
2023-04-16 11:38:52 +00:00
2023-04-25 19:53:09 +00:00
2023-04-21 02:45:48 -07:00
2023-04-03 15:59:21 +00:00
2023-04-11 10:27:57 +02:00
2023-04-03 09:24:11 +02:00
2023-04-19 19:13:45 +00:00
2023-04-13 22:10:26 -05:00
2023-04-05 15:59:29 +00:00
2023-04-26 21:02:56 +02:00
2023-04-25 19:53:09 +00:00
2023-04-13 22:10:26 -05:00
2023-04-13 22:10:26 -05:00