Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e0a0835

Browse files
committed
add visit_anon_const to EarlyContextAndPass
1 parent 0a2df62 commit e0a0835

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/librustc_lint/early.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
104104
run_early_pass!(self, check_pat_post, p);
105105
}
106106

107+
fn visit_anon_const(&mut self, c: &'a ast::AnonConst) {
108+
run_early_pass!(self, check_anon_const, c);
109+
ast_visit::walk_anon_const(self, c);
110+
}
111+
107112
fn visit_expr(&mut self, e: &'a ast::Expr) {
108113
self.with_lint_attrs(e.id, &e.attrs, |cx| {
109114
run_early_pass!(cx, check_expr, e);

src/librustc_lint/passes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ macro_rules! early_lint_methods {
170170
fn check_stmt(a: &ast::Stmt);
171171
fn check_arm(a: &ast::Arm);
172172
fn check_pat(a: &ast::Pat);
173+
fn check_anon_const(a: &ast::AnonConst);
173174
fn check_pat_post(a: &ast::Pat);
174175
fn check_expr(a: &ast::Expr);
175176
fn check_expr_post(a: &ast::Expr);

0 commit comments

Comments
 (0)