Auto merge of #89323 - estebank:derive-binop, r=petrochenkov
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. Fix #84515.
This commit is contained in:
commit
d7539a6af0
27 changed files with 667 additions and 108 deletions
|
@ -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?");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue