diff options
| author | Boxy <rust@boxyuwu.dev> | 2024-08-19 01:14:09 +0100 |
|---|---|---|
| committer | Boxy <rust@boxyuwu.dev> | 2024-08-19 01:14:22 +0100 |
| commit | b8eedfa3d217e19f806fd4f46a89b074f5e8659f (patch) | |
| tree | d6b049a54b54f6086ec0314b887ba7fcaf4c59f7 /compiler/rustc_ast_lowering/src/expr.rs | |
| parent | f04f6ca36d2439375d20a98be013384afbab0782 (diff) | |
| download | rust-b8eedfa3d217e19f806fd4f46a89b074f5e8659f.tar.gz rust-b8eedfa3d217e19f806fd4f46a89b074f5e8659f.zip | |
Retroactively feature gate `ConstArgKind::Path`
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index b5d8a547a8f..bb86e5c9325 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -387,7 +387,7 @@ impl<'hir> LoweringContext<'_, 'hir> { let node_id = self.next_node_id(); // HACK(min_generic_const_args): see lower_anon_const - if !arg.is_potential_trivial_const_arg() { + if !self.tcx.features().const_arg_path || !arg.is_potential_trivial_const_arg() { // Add a definition for the in-band const def. self.create_def(parent_def_id, node_id, kw::Empty, DefKind::AnonConst, f.span); } |
