Auto merge of #92364 - jackh726:Quantumplation/65853/param-heuristics, r=estebank
Better method call error messages Rebase/continuation of #71827 ~Based on #92360~ ~Based on #93118~ There's a decent description in #71827 that I won't copy here (for now at least) In addition to rebasing, I've tried to restore most of the original suggestions for invalid arguments. Unfortunately, this does make some of the errors a bit verbose. To fix this will require a bit of refactoring to some of the generalized error suggestion functions, and I just don't have the time to go into it right now. I think this is in a state that the error messages are overall better than before without a reduction in the suggestions given. ~I've tried to split out some of the easier and self-contained changes into separate commits (mostly in #92360, but also one here). There might be more than can be done here, but again just lacking time.~ r? `@estebank` as the original reviewer of #71827
This commit is contained in:
commit
07bb916d44
180 changed files with 10446 additions and 3067 deletions
|
@ -1654,7 +1654,15 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
|
|||
}),
|
||||
_ => None,
|
||||
};
|
||||
self.note_type_err(&mut diag, &obligation.cause, secondary_span, values, err, true);
|
||||
self.note_type_err(
|
||||
&mut diag,
|
||||
&obligation.cause,
|
||||
secondary_span,
|
||||
values,
|
||||
err,
|
||||
true,
|
||||
false,
|
||||
);
|
||||
self.note_obligation_cause(&mut diag, obligation);
|
||||
diag.emit();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue