about summary refs log tree commit diff
path: root/compiler/rustc_ast_passes
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-03-28 15:14:35 +0100
committerLeón Orell Valerian Liehr <me@fmease.dev>2025-03-28 18:15:23 +0100
commit7a295d1be07d191527dfcdf4613ced7ab6fa9676 (patch)
treea2dbb2fd926ea79c23c43a9ce4954b18da6d73c4 /compiler/rustc_ast_passes
parent90f5eab952728ac6edcf529a171f7de5c25e5d49 (diff)
downloadrust-7a295d1be07d191527dfcdf4613ced7ab6fa9676.tar.gz
rust-7a295d1be07d191527dfcdf4613ced7ab6fa9676.zip
Fix TAIT & ATPIT feature gating in the presence of anon consts
Diffstat (limited to 'compiler/rustc_ast_passes')
-rw-r--r--compiler/rustc_ast_passes/src/feature_gate.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs
index 31ff102c127..a3fcc110a16 100644
--- a/compiler/rustc_ast_passes/src/feature_gate.rs
+++ b/compiler/rustc_ast_passes/src/feature_gate.rs
@@ -99,6 +99,13 @@ impl<'a> PostExpansionVisitor<'a> {
                 }
                 visit::walk_ty(self, ty);
             }
+
+            fn visit_anon_const(&mut self, _: &ast::AnonConst) -> Self::Result {
+                // We don't walk the anon const because it crosses a conceptual boundary: We're no
+                // longer "inside" the original type.
+                // Brittle: We assume that the callers of `check_impl_trait` will later recurse into
+                // the items found in the AnonConst to look for nested TyAliases.
+            }
         }
         ImplTraitVisitor { vis: self, in_associated_ty }.visit_ty(ty);
     }