File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6002,7 +6002,8 @@ impl<'a> Parser<'a> {
60026002 if self . token . is_keyword ( keywords:: Const ) {
60036003 self . diagnostic ( )
60046004 . struct_span_err ( self . span , "extern items cannot be `const`" )
6005- . span_label ( self . span , "use `static` instead" ) . emit ( ) ;
6005+ . span_suggestion ( self . span , "instead try using" , "static" . to_owned ( ) )
6006+ . emit ( ) ;
60066007 }
60076008 self . bump ( ) ; // `static` or `const`
60086009 return Ok ( Some ( self . parse_item_foreign_static ( visibility, lo, attrs) ?) ) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: extern items cannot be `const`
22 --> $DIR/extern-const.rs:14:5
33 |
4414 | const C: u8; //~ ERROR extern items cannot be `const`
5- | ^^^^^ use `static` instead
5+ | ^^^^^ help: instead try using: `static`
66
77error: aborting due to previous error
88
You can’t perform that action at this time.
0 commit comments