1
Fork 0

use structured suggestion for "missing mut" label

Fixes #54133.
This commit is contained in:
Andy Russell 2018-09-12 14:13:40 -04:00
parent 6810f5286b
commit d871b8ad4a
No known key found for this signature in database
GPG key ID: BE2221033EDBC374
77 changed files with 179 additions and 164 deletions

View file

@ -14,7 +14,8 @@
fn test() {
let v: isize = 1; //[ast]~ NOTE first assignment
//[mir]~^ NOTE first assignment
//[mir]~| NOTE consider changing this to `mut v`
//[mir]~| HELP make this binding mutable
//[mir]~| SUGGESTION mut v
v.clone();
v = 2; //[ast]~ ERROR cannot assign twice to immutable variable
//[mir]~^ ERROR cannot assign twice to immutable variable `v`