diff options
| author | bors <bors@rust-lang.org> | 2023-12-04 14:46:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-04 14:46:49 +0000 |
| commit | e281163dc83dd747a817bdfbb81bf59c3747f7dc (patch) | |
| tree | def4231e0d57fa3428af349f4fb04a61772f3858 /compiler/rustc_resolve/src/lib.rs | |
| parent | 0a83e43f282353398e4b22466cf1f4e3cc8c1682 (diff) | |
| parent | f1397e6ff2b3fa8e6efa4815f603d055c172432d (diff) | |
Auto merge of #118602 - TaKO8Ki:rollup-njcouns, r=TaKO8Ki
Rollup of 5 pull requests Successful merges: - #118495 (Restrict what symbols can be used in `#[diagnostic::on_unimplemented]` format strings) - #118540 (codegen, miri: fix computing the offset of an unsized field in a packed struct) - #118551 (more targeted errors when extern types end up in places they should not) - #118573 (rustc: Harmonize `DefKind` and `DefPathData`) - #118586 (Improve example in `slice::windows()` doc) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 208391cc019..70e0eb12c01 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -45,7 +45,6 @@ use rustc_hir::def::NonMacroAttrKind; use rustc_hir::def::{self, CtorOf, DefKind, DocLinkResMap, LifetimeRes, PartialRes, PerNS}; use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LocalDefIdMap, LocalDefIdSet}; use rustc_hir::def_id::{CRATE_DEF_ID, LOCAL_CRATE}; -use rustc_hir::definitions::DefPathData; use rustc_hir::{PrimTy, TraitCandidate}; use rustc_index::IndexVec; use rustc_metadata::creader::{CStore, CrateLoader}; @@ -1212,11 +1211,12 @@ impl<'tcx> Resolver<'_, 'tcx> { &mut self, parent: LocalDefId, node_id: ast::NodeId, - data: DefPathData, + name: Symbol, def_kind: DefKind, expn_id: ExpnId, span: Span, ) -> LocalDefId { + let data = def_kind.def_path_data(name); assert!( !self.node_id_to_def_id.contains_key(&node_id), "adding a def'n for node-id {:?} and data {:?} but a previous def'n exists: {:?}", |
