Skip to content

Commit fad2535

Browse files
committed
Adjust an assertion.
No need to convert the `DefKind` to `DefPathData`, they're very similar types.
1 parent 2205455 commit fad2535

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_resolve/src

1 file changed

+3
-3
lines changed

compiler/rustc_resolve/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1339,12 +1339,12 @@ impl<'tcx> Resolver<'_, 'tcx> {
13391339
expn_id: ExpnId,
13401340
span: Span,
13411341
) -> TyCtxtFeed<'tcx, LocalDefId> {
1342-
let data = def_kind.def_path_data(name);
13431342
assert!(
13441343
!self.node_id_to_def_id.contains_key(&node_id),
1345-
"adding a def'n for node-id {:?} and data {:?} but a previous def'n exists: {:?}",
1344+
"adding a def for node-id {:?}, name {:?}, data {:?} but a previous def exists: {:?}",
13461345
node_id,
1347-
data,
1346+
name,
1347+
def_kind,
13481348
self.tcx.definitions_untracked().def_key(self.node_id_to_def_id[&node_id].key()),
13491349
);
13501350

0 commit comments

Comments
 (0)