]> git.lizzy.rs Git - rust.git/commitdiff
syntax: improve message for misused inner attributes
authorLiigo Zhuang <com.liigo@gmail.com>
Sat, 8 Nov 2014 09:23:27 +0000 (17:23 +0800)
committerLiigo Zhuang <com.liigo@gmail.com>
Tue, 11 Nov 2014 00:53:26 +0000 (08:53 +0800)
src/libsyntax/parse/attr.rs

index aefac804e4d88267e1881aad97f6f7002fec2912..0c919daa8ed11ce2514c6014a523f09a0ddcc37b 100644 (file)
@@ -75,6 +75,8 @@ fn parse_attribute(&mut self, permit_inner: bool) -> ast::Attribute {
                         self.span_err(span,
                                       "an inner attribute is not permitted in \
                                        this context");
+                        self.span_help(span,
+                                       "place inner attribute at the top of the module or block");
                     }
                     ast::AttrInner
                 } else {