summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr (renamed from src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr)48
1 files changed, 30 insertions, 18 deletions
diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr b/tests/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr
index b7623a540..774b6cf0e 100644
--- a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr
+++ b/tests/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr
@@ -1,11 +1,13 @@
error[E0594]: cannot assign to `t.0`, as `t` is not declared as mutable
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:13:9
|
-LL | let t: Tuple = (S(0), 0);
- | - help: consider changing this to be mutable: `mut t`
-LL | drop(t);
LL | t.0 = S(1);
| ^^^^^^^^^^ cannot assign
+ |
+help: consider changing this to be mutable
+ |
+LL | let mut t: Tuple = (S(0), 0);
+ | +++
error[E0382]: assign to part of moved value: `t`
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:13:9
@@ -20,20 +22,24 @@ LL | t.0 = S(1);
error[E0594]: cannot assign to `t.1`, as `t` is not declared as mutable
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:16:9
|
-LL | let t: Tuple = (S(0), 0);
- | - help: consider changing this to be mutable: `mut t`
-...
LL | t.1 = 2;
| ^^^^^^^ cannot assign
+ |
+help: consider changing this to be mutable
+ |
+LL | let mut t: Tuple = (S(0), 0);
+ | +++
error[E0594]: cannot assign to `u.0`, as `u` is not declared as mutable
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:24:9
|
-LL | let u: Tpair = Tpair(S(0), 0);
- | - help: consider changing this to be mutable: `mut u`
-LL | drop(u);
LL | u.0 = S(1);
| ^^^^^^^^^^ cannot assign
+ |
+help: consider changing this to be mutable
+ |
+LL | let mut u: Tpair = Tpair(S(0), 0);
+ | +++
error[E0382]: assign to part of moved value: `u`
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:24:9
@@ -48,20 +54,24 @@ LL | u.0 = S(1);
error[E0594]: cannot assign to `u.1`, as `u` is not declared as mutable
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:27:9
|
-LL | let u: Tpair = Tpair(S(0), 0);
- | - help: consider changing this to be mutable: `mut u`
-...
LL | u.1 = 2;
| ^^^^^^^ cannot assign
+ |
+help: consider changing this to be mutable
+ |
+LL | let mut u: Tpair = Tpair(S(0), 0);
+ | +++
error[E0594]: cannot assign to `v.x`, as `v` is not declared as mutable
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:35:9
|
-LL | let v: Spair = Spair { x: S(0), y: 0 };
- | - help: consider changing this to be mutable: `mut v`
-LL | drop(v);
LL | v.x = S(1);
| ^^^^^^^^^^ cannot assign
+ |
+help: consider changing this to be mutable
+ |
+LL | let mut v: Spair = Spair { x: S(0), y: 0 };
+ | +++
error[E0382]: assign to part of moved value: `v`
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:35:9
@@ -76,11 +86,13 @@ LL | v.x = S(1);
error[E0594]: cannot assign to `v.y`, as `v` is not declared as mutable
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:38:9
|
-LL | let v: Spair = Spair { x: S(0), y: 0 };
- | - help: consider changing this to be mutable: `mut v`
-...
LL | v.y = 2;
| ^^^^^^^ cannot assign
+ |
+help: consider changing this to be mutable
+ |
+LL | let mut v: Spair = Spair { x: S(0), y: 0 };
+ | +++
error: aborting due to 9 previous errors