about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorKornel <kornel@geekhood.net>2017-08-10 12:16:01 +0100
committerKornel <kornel@geekhood.net>2017-08-10 12:31:02 +0100
commitcabc9be9e2057c5197db273ba0c750aad5ff3366 (patch)
treea42b3691ad43595510fe3b68bb522c6a69d5b53c /src/libsyntax/parse
parenta965beef8f362e1db47eadd0ff701ec57cc23cfe (diff)
downloadrust-cabc9be9e2057c5197db273ba0c750aad5ff3366.tar.gz
rust-cabc9be9e2057c5197db273ba0c750aad5ff3366.zip
Reword error hint
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index cb28f356fe6..7bf4c6799b3 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -6002,7 +6002,8 @@ impl<'a> Parser<'a> {
             if self.token.is_keyword(keywords::Const) {
                 self.diagnostic()
                     .struct_span_err(self.span, "extern items cannot be `const`")
-                    .span_label(self.span, "use `static` instead").emit();
+                    .span_suggestion(self.span, "instead try using", "static".to_owned())
+                    .emit();
             }
             self.bump(); // `static` or `const`
             return Ok(Some(self.parse_item_foreign_static(visibility, lo, attrs)?));