Skip to content

Commit 0c6a690

Browse files
committed
Update ui tests
1 parent fce7645 commit 0c6a690

24 files changed

+73
-720
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
error[E0502]: cannot borrow `y` as immutable because it is also borrowed as mutable
2-
--> $DIR/borrowck-anon-fields-struct.rs:23:19
3-
|
4-
LL | Y(ref mut a, _) => a
5-
| --------- mutable borrow occurs here
6-
...
7-
LL | let b = match y {
8-
| ^ immutable borrow occurs here
9-
...
10-
LL | *a += 1;
11-
| ------- borrow later used here
12-
13-
error[E0502]: cannot borrow `y` as immutable because it is also borrowed as mutable
14-
--> $DIR/borrowck-anon-fields-struct.rs:38:19
15-
|
16-
LL | Y(ref mut a, _) => a
17-
| --------- mutable borrow occurs here
18-
...
19-
LL | let b = match y {
20-
| ^ immutable borrow occurs here
21-
...
22-
LL | *a += 1;
23-
| ------- borrow later used here
24-
251
error[E0499]: cannot borrow `y.0` as mutable more than once at a time
262
--> $DIR/borrowck-anon-fields-struct.rs:39:11
273
|
@@ -34,7 +10,6 @@ LL | Y(ref mut b, _) => b //~ ERROR cannot borrow
3410
LL | *a += 1;
3511
| ------- borrow later used here
3612

37-
error: aborting due to 3 previous errors
13+
error: aborting due to previous error
3814

39-
Some errors occurred: E0499, E0502.
40-
For more information about an error, try `rustc --explain E0499`.
15+
For more information about this error, try `rustc --explain E0499`.
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
error[E0502]: cannot borrow `y` as immutable because it is also borrowed as mutable
2-
--> $DIR/borrowck-anon-fields-tuple.rs:21:19
3-
|
4-
LL | (ref mut a, _) => a
5-
| --------- mutable borrow occurs here
6-
...
7-
LL | let b = match y {
8-
| ^ immutable borrow occurs here
9-
...
10-
LL | *a += 1;
11-
| ------- borrow later used here
12-
13-
error[E0502]: cannot borrow `y` as immutable because it is also borrowed as mutable
14-
--> $DIR/borrowck-anon-fields-tuple.rs:36:19
15-
|
16-
LL | (ref mut a, _) => a
17-
| --------- mutable borrow occurs here
18-
...
19-
LL | let b = match y {
20-
| ^ immutable borrow occurs here
21-
...
22-
LL | *a += 1;
23-
| ------- borrow later used here
24-
251
error[E0499]: cannot borrow `y.0` as mutable more than once at a time
262
--> $DIR/borrowck-anon-fields-tuple.rs:37:10
273
|
@@ -34,7 +10,6 @@ LL | (ref mut b, _) => b //~ ERROR cannot borrow
3410
LL | *a += 1;
3511
| ------- borrow later used here
3612

37-
error: aborting due to 3 previous errors
13+
error: aborting due to previous error
3814

39-
Some errors occurred: E0499, E0502.
40-
For more information about an error, try `rustc --explain E0499`.
15+
For more information about this error, try `rustc --explain E0499`.
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
error[E0502]: cannot borrow `y` as immutable because it is also borrowed as mutable
2-
--> $DIR/borrowck-anon-fields-variant.rs:26:19
3-
|
4-
LL | Foo::Y(ref mut a, _) => a,
5-
| --------- mutable borrow occurs here
6-
...
7-
LL | let b = match y {
8-
| ^ immutable borrow occurs here
9-
...
10-
LL | *a += 1;
11-
| ------- borrow later used here
12-
13-
error[E0502]: cannot borrow `y` as immutable because it is also borrowed as mutable
14-
--> $DIR/borrowck-anon-fields-variant.rs:43:19
15-
|
16-
LL | Foo::Y(ref mut a, _) => a,
17-
| --------- mutable borrow occurs here
18-
...
19-
LL | let b = match y {
20-
| ^ immutable borrow occurs here
21-
...
22-
LL | *a += 1;
23-
| ------- borrow later used here
24-
251
error[E0499]: cannot borrow `y.0` as mutable more than once at a time
262
--> $DIR/borrowck-anon-fields-variant.rs:44:14
273
|
@@ -34,7 +10,6 @@ LL | Foo::Y(ref mut b, _) => b, //~ ERROR cannot borrow
3410
LL | *a += 1;
3511
| ------- borrow later used here
3612

37-
error: aborting due to 3 previous errors
13+
error: aborting due to previous error
3814

39-
Some errors occurred: E0499, E0502.
40-
For more information about an error, try `rustc --explain E0499`.
15+
For more information about this error, try `rustc --explain E0499`.

src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.nll.stderr

+1-12
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@ LL | let _bar2 = &mut foo.bar1; //~ ERROR cannot borrow
2828
LL | *bar1;
2929
| ----- borrow later used here
3030

31-
error[E0502]: cannot borrow `*foo` as immutable because it is also borrowed as mutable
32-
--> $DIR/borrowck-borrow-from-owned-ptr.rs:72:11
33-
|
34-
LL | let bar1 = &mut foo.bar1;
35-
| ------------- mutable borrow occurs here
36-
LL | match *foo {
37-
| ^^^^ immutable borrow occurs here
38-
...
39-
LL | *bar1;
40-
| ----- borrow later used here
41-
4231
error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time
4332
--> $DIR/borrowck-borrow-from-owned-ptr.rs:73:21
4433
|
@@ -121,7 +110,7 @@ LL | let foo = make_foo();
121110
LL | let bar1 = &mut foo.bar1; //~ ERROR cannot borrow
122111
| ^^^^^^^^^^^^^ cannot borrow as mutable
123112

124-
error: aborting due to 12 previous errors
113+
error: aborting due to 11 previous errors
125114

126115
Some errors occurred: E0499, E0502, E0596.
127116
For more information about an error, try `rustc --explain E0499`.

src/test/ui/borrowck/borrowck-borrow-from-stack-variable.nll.stderr

+1-12
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@ LL | let _bar2 = &mut foo.bar1; //~ ERROR cannot borrow
2828
LL | *bar1;
2929
| ----- borrow later used here
3030

31-
error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable
32-
--> $DIR/borrowck-borrow-from-stack-variable.rs:70:11
33-
|
34-
LL | let bar1 = &mut foo.bar1;
35-
| ------------- mutable borrow occurs here
36-
LL | match foo {
37-
| ^^^ immutable borrow occurs here
38-
...
39-
LL | *bar1;
40-
| ----- borrow later used here
41-
4231
error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time
4332
--> $DIR/borrowck-borrow-from-stack-variable.rs:71:21
4433
|
@@ -121,7 +110,7 @@ LL | let foo = make_foo();
121110
LL | let bar1 = &mut foo.bar1; //~ ERROR cannot borrow
122111
| ^^^^^^^^^^^^^ cannot borrow as mutable
123112

124-
error: aborting due to 12 previous errors
113+
error: aborting due to 11 previous errors
125114

126115
Some errors occurred: E0499, E0502, E0596.
127116
For more information about an error, try `rustc --explain E0499`.

0 commit comments

Comments
 (0)