Skip to content

Commit 0a52cc3

Browse files
committed
syntax: improve message for misused inner attributes
1 parent f89e975 commit 0a52cc3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/libsyntax/parse/attr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ impl<'a> ParserAttr for Parser<'a> {
7575
self.span_err(span,
7676
"an inner attribute is not permitted in \
7777
this context");
78+
self.span_help(span,
79+
"place inner attribute at the top of the module or block");
7880
}
7981
ast::AttrInner
8082
} else {

0 commit comments

Comments
 (0)