Skip to content

Commit eabd51a

Browse files
Call all visit methods on trait definitions
1 parent 14c9ab8 commit eabd51a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_passes/ast_validation.rs

+3
Original file line numberDiff line numberDiff line change
@@ -722,11 +722,14 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
722722

723723
// Equivalent of `visit::walk_item` for `ItemKind::Trait` that inserts a bound
724724
// context for the supertraits.
725+
self.visit_vis(&item.vis);
726+
self.visit_ident(item.ident);
725727
self.visit_generics(generics);
726728
self.with_bound_context(Some(BoundContext::TraitBounds), |this| {
727729
walk_list!(this, visit_param_bound, bounds);
728730
});
729731
walk_list!(self, visit_trait_item, trait_items);
732+
walk_list!(self, visit_attribute, &item.attrs);
730733
return;
731734
}
732735
ItemKind::Mod(_) => {

0 commit comments

Comments
 (0)