diff options
| author | bors <bors@rust-lang.org> | 2025-04-25 12:27:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-25 12:27:16 +0000 |
| commit | 8f43b85954d2f3d8fc00a7504c603e5ca9eb0695 (patch) | |
| tree | cdfdd7add225aa6dfd39fc28a83cde44a9312ee1 /compiler/rustc_trait_selection/src | |
| parent | 5c54aa781f97ae95ef01a3120650907b87d385d3 (diff) | |
| parent | 3c08a50a15e414d1fb80810b35b050aaf97e9b1c (diff) | |
| download | rust-8f43b85954d2f3d8fc00a7504c603e5ca9eb0695.tar.gz rust-8f43b85954d2f3d8fc00a7504c603e5ca9eb0695.zip | |
Auto merge of #140282 - matthiaskrgr:rollup-g6ze4jj, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #137653 (Deprecate the unstable `concat_idents!`) - #138957 (Update the index of Option to make the summary more comprehensive) - #140006 (ensure compiler existance of tools on the dist step) - #140143 (Move `sys::pal::os::Env` into `sys::env`) - #140202 (Make #![feature(let_chains)] bootstrap conditional in compiler/) - #140236 (norm nested aliases before evaluating the parent goal) - #140257 (Some drive-by housecleaning in `rustc_borrowck`) - #140278 (Don't use item name to look up associated item from trait item) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/lib.rs | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs index df6e8fc4503..4330f1f2292 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs @@ -1523,19 +1523,17 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { return None; }; - let trait_assoc_item = self.tcx.opt_associated_item(proj.projection_term.def_id)?; - let trait_assoc_ident = trait_assoc_item.ident(self.tcx); - let mut associated_items = vec![]; self.tcx.for_each_relevant_impl( self.tcx.trait_of_item(proj.projection_term.def_id)?, proj.projection_term.self_ty(), |impl_def_id| { associated_items.extend( - self.tcx - .associated_items(impl_def_id) - .in_definition_order() - .find(|assoc| assoc.ident(self.tcx) == trait_assoc_ident), + self.tcx.associated_items(impl_def_id).in_definition_order().find( + |assoc| { + assoc.trait_item_def_id == Some(proj.projection_term.def_id) + }, + ), ); }, ); diff --git a/compiler/rustc_trait_selection/src/lib.rs b/compiler/rustc_trait_selection/src/lib.rs index 93c11805304..7613a0cef52 100644 --- a/compiler/rustc_trait_selection/src/lib.rs +++ b/compiler/rustc_trait_selection/src/lib.rs @@ -14,6 +14,7 @@ #![allow(internal_features)] #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] +#![cfg_attr(bootstrap, feature(let_chains))] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(assert_matches)] @@ -23,7 +24,6 @@ #![feature(if_let_guard)] #![feature(iter_intersperse)] #![feature(iterator_try_reduce)] -#![feature(let_chains)] #![feature(never_type)] #![feature(rustdoc_internals)] #![feature(try_blocks)] |
