Skip to content

Commit b6b11f0

Browse files
Call all visit methods on trait definitions
1 parent 343e157 commit b6b11f0

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
@@ -741,11 +741,14 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
741741

742742
// Equivalent of `visit::walk_item` for `ItemKind::Trait` that inserts a bound
743743
// context for the supertraits.
744+
self.visit_vis(&item.vis);
745+
self.visit_ident(item.ident);
744746
self.visit_generics(generics);
745747
self.with_bound_context(Some(BoundContext::TraitBounds), |this| {
746748
walk_list!(this, visit_param_bound, bounds);
747749
});
748750
walk_list!(self, visit_trait_item, trait_items);
751+
walk_list!(self, visit_attribute, &item.attrs);
749752
return;
750753
}
751754
ItemKind::Mod(_) => {

0 commit comments

Comments
 (0)