Skip to content

Commit 0a52cc3

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libsyntax/parse/attr.rs

+2
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)