1
Fork 0

Consider unfulfilled obligations in binop errors

When encountering a binop where the types would have been accepted, if
all the predicates had been fulfilled, include information about the
predicates and suggest appropriate `#[derive]`s if possible.

Point at trait(s) that needs to be `impl`emented.
This commit is contained in:
Esteban Kuber 2021-09-28 14:48:54 +00:00
parent 074f63648b
commit e8fc076f23
27 changed files with 667 additions and 108 deletions

View file

@ -521,7 +521,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
"this error might have been caused by changes to \
Rust's type-inference algorithm (see issue #48950 \
<https://github.com/rust-lang/rust/issues/48950> \
for more information).",
for more information)",
);
err.help("did you intend to use the type `()` here instead?");
}