about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/diagnostics.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-19 13:10:12 +0000
committerbors <bors@rust-lang.org>2022-04-19 13:10:12 +0000
commit4ca19e09d302a4cbde14f9cb1bc109179dc824cd (patch)
treeb779b25871b429dfaafe1c4de5cc5051333c3689 /compiler/rustc_resolve/src/diagnostics.rs
parentc102c5cfc60203c82460bdde2eecd19ccd8c125b (diff)
parent9fad214593e87f151b8f09ff0cda9cd52372d037 (diff)
downloadrust-4ca19e09d302a4cbde14f9cb1bc109179dc824cd.tar.gz
rust-4ca19e09d302a4cbde14f9cb1bc109179dc824cd.zip
Auto merge of #96214 - Dylan-DPC:rollup-a5b4fow, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #94493 (Improved diagnostic on failure to meet send bound on future in a foreign crate)
 - #95809 (Fix typo in bootstrap.py)
 - #96086 (Remove `--extern-location` and all associated code)
 - #96089 (`alloc`: make `vec!` unavailable under `no_global_oom_handling`)
 - #96122 (Fix an invalid error for a suggestion to add a slice in pattern-matching)
 - #96142 (Stop using CRATE_DEF_INDEX outside of metadata encoding.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
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 f3b8c1e266c..899980a4c08 100644
--- a/compiler/rustc_resolve/src/diagnostics.rs
+++ b/compiler/rustc_resolve/src/diagnostics.rs
@@ -10,7 +10,7 @@ use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed
 use rustc_feature::BUILTIN_ATTRIBUTES;
 use rustc_hir::def::Namespace::{self, *};
 use rustc_hir::def::{self, CtorKind, CtorOf, DefKind, NonMacroAttrKind, PerNS};
-use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
+use rustc_hir::def_id::{DefId, CRATE_DEF_ID, LOCAL_CRATE};
 use rustc_hir::PrimTy;
 use rustc_middle::bug;
 use rustc_middle::ty::DefIdTree;
@@ -1167,7 +1167,7 @@ impl<'a> Resolver<'a> {
                 }
                 Scope::ExternPrelude => {
                     suggestions.extend(this.extern_prelude.iter().filter_map(|(ident, _)| {
-                        let res = Res::Def(DefKind::Mod, DefId::local(CRATE_DEF_INDEX));
+                        let res = Res::Def(DefKind::Mod, CRATE_DEF_ID.to_def_id());
                         filter_fn(res).then_some(TypoSuggestion::typo_from_res(ident.name, res))
                     }));
                 }