]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr
use structured suggestion for "missing mut" label
[rust.git] / src / test / ui / borrowck / reassignment_immutable_fields_twice.stderr
index b3c013d8b1f493ce3801aae56d9c4bc6874ceb9d..65dff51059cefed5fb1e1ad7cd904b46e3849409 100644 (file)
@@ -2,7 +2,7 @@ error[E0594]: cannot assign to field `x.0` of immutable binding
   --> $DIR/reassignment_immutable_fields_twice.rs:17:5
    |
 LL |     let x: (u32, u32);
-   |         - consider changing this to `mut x`
+   |         - help: make this binding mutable: `mut x`
 LL |     x = (22, 44);
 LL |     x.0 = 1; //~ ERROR
    |     ^^^^^^^ cannot mutably borrow field of immutable binding
@@ -11,7 +11,7 @@ error[E0594]: cannot assign to field `x.0` of immutable binding
   --> $DIR/reassignment_immutable_fields_twice.rs:22:5
    |
 LL |     let x: (u32, u32);
-   |         - consider changing this to `mut x`
+   |         - help: make this binding mutable: `mut x`
 LL |     x.0 = 1; //~ ERROR
    |     ^^^^^^^ cannot mutably borrow field of immutable binding
 
@@ -19,7 +19,7 @@ error[E0594]: cannot assign to field `x.0` of immutable binding
   --> $DIR/reassignment_immutable_fields_twice.rs:23:5
    |
 LL |     let x: (u32, u32);
-   |         - consider changing this to `mut x`
+   |         - help: make this binding mutable: `mut x`
 LL |     x.0 = 1; //~ ERROR
 LL |     x.0 = 22; //~ ERROR
    |     ^^^^^^^^ cannot mutably borrow field of immutable binding
@@ -28,7 +28,7 @@ error[E0594]: cannot assign to field `x.1` of immutable binding
   --> $DIR/reassignment_immutable_fields_twice.rs:24:5
    |
 LL |     let x: (u32, u32);
-   |         - consider changing this to `mut x`
+   |         - help: make this binding mutable: `mut x`
 ...
 LL |     x.1 = 44; //~ ERROR
    |     ^^^^^^^^ cannot mutably borrow field of immutable binding