diff options
Diffstat (limited to 'src/libsyntax/visit.rs')
| -rw-r--r-- | src/libsyntax/visit.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index 64393a295de..117787d08c7 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -846,7 +846,10 @@ pub fn walk_vis<'a, V: Visitor<'a>>(visitor: &mut V, vis: &'a Visibility) { } pub fn walk_attribute<'a, V: Visitor<'a>>(visitor: &mut V, attr: &'a Attribute) { - visitor.visit_tts(attr.item.tokens.clone()); + match attr.kind { + AttrKind::Normal(ref item) => visitor.visit_tts(item.tokens.clone()), + AttrKind::DocComment(_) => {} + } } pub fn walk_tt<'a, V: Visitor<'a>>(visitor: &mut V, tt: TokenTree) { |
