diff options
| author | bors <bors@rust-lang.org> | 2025-06-15 09:17:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-15 09:17:15 +0000 |
| commit | 75e7cf5f85aad82331a38deff24845b63eaf30f3 (patch) | |
| tree | c24aa939ad67793633229b7a0eaf138ac2e73d30 /compiler/rustc_ast/src | |
| parent | 0cbc0764380630780a275c437260e4d4d5f28c92 (diff) | |
| parent | ae8ca1f8581e25fabf728e8081779ae199f470aa (diff) | |
| download | rust-75e7cf5f85aad82331a38deff24845b63eaf30f3.tar.gz rust-75e7cf5f85aad82331a38deff24845b63eaf30f3.zip | |
Auto merge of #142398 - fee1-dead-contrib:push-ynxrtswtkyxw, r=oli-obk
early linting: avoid redundant calls to `check_id` An attempt to address the regression at https://github.com/rust-lang/rust/pull/142240#issuecomment-2964425460 r? `@oli-obk` cc `@nnethercote` who might have a better understanding of the performance implications
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/visit.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/visit.rs b/compiler/rustc_ast/src/visit.rs index c88aa5c33ea..1449a4a5fb3 100644 --- a/compiler/rustc_ast/src/visit.rs +++ b/compiler/rustc_ast/src/visit.rs @@ -1700,7 +1700,8 @@ fn visit_nested_use_tree<'a, V: Visitor<'a>>( } pub fn walk_stmt<'a, V: Visitor<'a>>(visitor: &mut V, statement: &'a Stmt) -> V::Result { - let Stmt { id: _, kind, span: _ } = statement; + let Stmt { id, kind, span: _ } = statement; + try_visit!(visit_id(visitor, id)); match kind { StmtKind::Let(local) => try_visit!(visitor.visit_local(local)), StmtKind::Item(item) => try_visit!(visitor.visit_item(item)), |
