diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2024-07-16 02:02:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-16 02:02:25 -0500 |
| commit | 1abed9fa068ea76cc048e1fc629fd59e69fb54b4 (patch) | |
| tree | 15378f16c39e6c0b275a0247bb7dbc3d07cbae03 /compiler | |
| parent | 7f8e0e6ef3cec356be0d78deec314f91d9c9459b (diff) | |
| parent | 841b30f63ea1592f40a906ed1400c1999b89b4ee (diff) | |
| download | rust-1abed9fa068ea76cc048e1fc629fd59e69fb54b4.tar.gz rust-1abed9fa068ea76cc048e1fc629fd59e69fb54b4.zip | |
Rollup merge of #127780 - compiler-errors:zip-args, r=jieyouxu
Make sure trait def ids match before zipping args in `note_function_argument_obligation` Fixes #126416 Fixes #127745 Didn't add both tests b/c I felt like it was unnecessary.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs index 2cf808f962f..f8843b892db 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs @@ -3810,6 +3810,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { { if let Some(where_pred) = where_pred.as_trait_clause() && let Some(failed_pred) = failed_pred.as_trait_clause() + && where_pred.def_id() == failed_pred.def_id() { self.enter_forall(where_pred, |where_pred| { let failed_pred = self.instantiate_binder_with_fresh_vars( |
