about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/diagnostics.rs
diff options
context:
space:
mode:
authorThe rustc-josh-sync Cronjob Bot <github-actions@github.com>2025-08-07 04:18:21 +0000
committerThe rustc-josh-sync Cronjob Bot <github-actions@github.com>2025-08-07 04:18:21 +0000
commite296468a473de9c4173f673e45f05da6dd911d7c (patch)
tree40a1b0e61f6e6557bd7e91224505244287c0306f /compiler/rustc_resolve/src/diagnostics.rs
parent4f96b2aa5e333fc1cad8b5987bfc2d18821d6d4d (diff)
parent6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd (diff)
downloadrust-e296468a473de9c4173f673e45f05da6dd911d7c.tar.gz
rust-e296468a473de9c4173f673e45f05da6dd911d7c.zip
Merge ref '6bcdcc73bd11' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd
Filtered ref: 6cc4ce79e1f8dc0ec5a2e18049b9c1a51dee3221

This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'compiler/rustc_resolve/src/diagnostics.rs')
-rw-r--r--compiler/rustc_resolve/src/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs
index 3b57f6e883a..d18554bba1b 100644
--- a/compiler/rustc_resolve/src/diagnostics.rs
+++ b/compiler/rustc_resolve/src/diagnostics.rs
@@ -1098,7 +1098,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
                     }
                 }
                 Scope::ExternPrelude => {
-                    suggestions.extend(this.extern_prelude.iter().filter_map(|(ident, _)| {
+                    suggestions.extend(this.extern_prelude.keys().filter_map(|ident| {
                         let res = Res::Def(DefKind::Mod, CRATE_DEF_ID.to_def_id());
                         filter_fn(res).then_some(TypoSuggestion::typo_from_ident(*ident, res))
                     }));
@@ -1409,7 +1409,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
         );
 
         if lookup_ident.span.at_least_rust_2018() {
-            for ident in self.extern_prelude.clone().into_keys() {
+            for &ident in self.extern_prelude.keys() {
                 if ident.span.from_expansion() {
                     // Idents are adjusted to the root context before being
                     // resolved in the extern prelude, so reporting this to the