about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-04-28 22:56:44 +0200
committerGitHub <noreply@github.com>2023-04-28 22:56:44 +0200
commitaba9fb4696a300f8fa95e838ac9da81c61714617 (patch)
tree1a5024987358c39a5fc6de1d2c49b1328c3a7326 /tests/rustdoc-js-std/parser-errors.js
parentf35747517052240277835b6b2dec553ba547ec00 (diff)
parent3125979b78db0d4e2151f430d6f3f4464c086569 (diff)
downloadrust-aba9fb4696a300f8fa95e838ac9da81c61714617.tar.gz
rust-aba9fb4696a300f8fa95e838ac9da81c61714617.zip
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
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions