diff options
| author | bors <bors@rust-lang.org> | 2022-04-16 06:55:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-16 06:55:28 +0000 |
| commit | 07bb916d44a66d2caba427c7ee132bbeb245977b (patch) | |
| tree | 81950b54d9588bdfb9ecd7d96233b2e4865f66e9 /compiler/rustc_trait_selection/src | |
| parent | 080d5452e1bb6e18e12a073d4d0283fd9b6dac0b (diff) | |
| parent | b6c87c555f3b664f558d137d5f7696a07488157e (diff) | |
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
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 0cb70de2415..50e4fafdd6c 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -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(); }); |
