about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorLiigo Zhuang <com.liigo@gmail.com>2014-11-08 17:23:27 +0800
committerLiigo Zhuang <com.liigo@gmail.com>2014-11-11 08:53:26 +0800
commit0a52cc3534b7bc72e6fc20afdaac995ba80e44e1 (patch)
tree2651e66cc8cee0a6e53ee612d5573d7cdacfae85 /src/libsyntax/parse
parentf89e975685a3a9f258c996865cdd144a0f30f83c (diff)
downloadrust-0a52cc3534b7bc72e6fc20afdaac995ba80e44e1.tar.gz
rust-0a52cc3534b7bc72e6fc20afdaac995ba80e44e1.zip
syntax: improve message for misused inner attributes
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/attr.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index aefac804e4d..0c919daa8ed 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -75,6 +75,8 @@ impl<'a> ParserAttr for Parser<'a> {
                         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 {