1
- warning [E0503]: cannot use `y` because it was mutably borrowed
1
+ error [E0503]: cannot use `y` because it was mutably borrowed
2
2
--> $DIR/borrowck-anon-fields-variant.rs:17:7
3
3
|
4
4
LL | Foo::Y(ref mut a, _) => a,
@@ -9,13 +9,9 @@ LL | Foo::Y(_, ref mut b) => b,
9
9
...
10
10
LL | *a += 1;
11
11
| ------- borrow later used here
12
- |
13
- = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
14
- = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
15
- = note: for more information, try `rustc --explain E0729`
16
12
17
13
error[E0503]: cannot use `y` because it was mutably borrowed
18
- --> $DIR/borrowck-anon-fields-variant.rs:37 :7
14
+ --> $DIR/borrowck-anon-fields-variant.rs:35 :7
19
15
|
20
16
LL | Foo::Y(ref mut a, _) => a,
21
17
| --------- borrow of `y.0` occurs here
@@ -27,7 +23,7 @@ LL | *a += 1;
27
23
| ------- borrow later used here
28
24
29
25
error[E0499]: cannot borrow `y.0` as mutable more than once at a time
30
- --> $DIR/borrowck-anon-fields-variant.rs:37 :14
26
+ --> $DIR/borrowck-anon-fields-variant.rs:35 :14
31
27
|
32
28
LL | Foo::Y(ref mut a, _) => a,
33
29
| --------- first mutable borrow occurs here
@@ -38,7 +34,7 @@ LL | Foo::Y(ref mut b, _) => b,
38
34
LL | *a += 1;
39
35
| ------- first borrow later used here
40
36
41
- error: aborting due to 2 previous errors
37
+ error: aborting due to 3 previous errors
42
38
43
39
Some errors have detailed explanations: E0499, E0503.
44
40
For more information about an error, try `rustc --explain E0499`.
0 commit comments