diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-04-26 08:18:26 +0000 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2025-04-28 18:11:15 +0200 |
| commit | 2ac60bc0896b4edd09e192204e768ddbe715a573 (patch) | |
| tree | 767da751f3c0e457d6539c914c9fb65c6ae02c2e /compiler/rustc_ast_lowering/src/expr.rs | |
| parent | a932eb36f8adf6c8cdfc450f063943da3112d621 (diff) | |
| download | rust-2ac60bc0896b4edd09e192204e768ddbe715a573.tar.gz rust-2ac60bc0896b4edd09e192204e768ddbe715a573.zip | |
We always use the current item as parent, so no need to pass it
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/expr.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index 8e1a3cd1435..9f3aed9216c 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -492,9 +492,8 @@ impl<'hir> LoweringContext<'_, 'hir> { let mut generic_args = ThinVec::new(); for (idx, arg) in args.iter().cloned().enumerate() { if legacy_args_idx.contains(&idx) { - let parent_def_id = self.current_hir_id_owner.def_id; let node_id = self.next_node_id(); - self.create_def(parent_def_id, node_id, None, DefKind::AnonConst, f.span); + self.create_def(node_id, None, DefKind::AnonConst, f.span); let mut visitor = WillCreateDefIdsVisitor {}; let const_value = if let ControlFlow::Break(span) = visitor.visit_expr(&arg) { AstP(Expr { |
