about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index ca362ec9368..c34317e649d 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -6007,7 +6007,9 @@ impl<'a> Parser<'a> {
         }
 
         if self.check_keyword(keywords::Const) {
-            return Err(self.span_fatal(self.span, "extern items cannot be `const`"));
+            let mut err = self.span_fatal(self.span, "extern items cannot be `const`");
+            err.help("use `static` instead");
+            return Err(err);
         }
 
         // FIXME #5668: this will occur for a macro invocation: