diff options
| author | Kornel <kornel@geekhood.net> | 2017-08-07 18:23:15 +0100 |
|---|---|---|
| committer | Kornel <kornel@geekhood.net> | 2017-08-07 18:23:15 +0100 |
| commit | ff0513c6973523b65f59b8b508ca85dc2944c988 (patch) | |
| tree | c8191cbe5c7aeb50786d3b5624df994f05506ae0 /src/libsyntax/parse/parser.rs | |
| parent | e8f558543bf2c8e9c056443c144ca9c3ff98f0f3 (diff) | |
| download | rust-ff0513c6973523b65f59b8b508ca85dc2944c988.tar.gz rust-ff0513c6973523b65f59b8b508ca85dc2944c988.zip | |
Hint correct extern constant syntax
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
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: |
