Skip to content

Commit e400639

Browse files
committed
Avoid creating duplicate defs
1 parent ebdb5a8 commit e400639

File tree

1 file changed

+0
-9
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+0
-9
lines changed

compiler/rustc_ast_lowering/src/asm.rs

-9
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
1515
use rustc_hir as hir;
1616
use rustc_hir::def::{DefKind, Res};
1717
use rustc_session::parse::feature_err;
18-
use rustc_span::symbol::kw;
1918
use rustc_span::{sym, Span};
2019
use rustc_target::asm;
2120
use std::collections::hash_map::Entry;
@@ -222,15 +221,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
222221
};
223222

224223
// Wrap the expression in an AnonConst.
225-
let parent_def_id = self.current_hir_id_owner;
226224
let node_id = self.next_node_id();
227-
self.create_def(
228-
parent_def_id.def_id,
229-
node_id,
230-
kw::Empty,
231-
DefKind::AnonConst,
232-
*op_sp,
233-
);
234225
let anon_const = AnonConst { id: node_id, value: P(expr) };
235226
hir::InlineAsmOperand::SymFn {
236227
anon_const: self.lower_anon_const(&anon_const),

0 commit comments

Comments
 (0)