Hint correct extern constant syntax
This commit is contained in:
parent
e8f558543b
commit
ff0513c697
1 changed files with 3 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue