1
Fork 0

Rollup merge of #139662 - nnethercote:tweak-DefPathData, r=compiler-errors

Tweak `DefPathData`

Some improvements in and around `DefPathData`, following on from #137977.

r? `@spastorino`
This commit is contained in:
Jacob Pratt 2025-04-11 21:21:01 +02:00 committed by GitHub
commit 2b54f9bfb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 48 additions and 44 deletions

View file

@ -1337,12 +1337,12 @@ impl<'tcx> Resolver<'_, 'tcx> {
expn_id: ExpnId,
span: Span,
) -> TyCtxtFeed<'tcx, 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: {:?}",
"adding a def for node-id {:?}, name {:?}, data {:?} but a previous def exists: {:?}",
node_id,
data,
name,
def_kind,
self.tcx.definitions_untracked().def_key(self.node_id_to_def_id[&node_id].key()),
);