Rollup merge of #57795 - estebank:did-you-mean, r=zackmdavis

Use structured suggestion in stead of notes
This commit is contained in:
Mazdak Farrokhzad 2019-01-24 00:19:55 +01:00 committed by GitHub
commit da182a0fe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 44 additions and 41 deletions

View file

@ -1,6 +1,6 @@
const
mut //~ ERROR: const globals cannot be mutable
//~^ HELP did you mean to declare a static?
//~^^ HELP you might want to declare a static instead
FOO: usize = 3;
fn main() {

View file

@ -1,10 +1,10 @@
error: const globals cannot be mutable
--> $DIR/issue-17718-const-mut.rs:2:1
|
LL | const
| ----- help: you might want to declare a static instead: `static`
LL | mut //~ ERROR: const globals cannot be mutable
| ^^^
|
= help: did you mean to declare a static?
| ^^^ cannot be mutable
error: aborting due to previous error