Skip to content

Commit b9eaad2

Browse files
committed
Adjust & --bless tests due to no longer downgrading NLL errors on 2015.
1 parent 0c7c98f commit b9eaad2

39 files changed

+104
-1174
lines changed

src/test/ui/borrowck/borrowck-anon-fields-variant.nll.stderr

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/test/ui/borrowck/borrowck-anon-fields-variant.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ fn distinct_variant() {
1515
// reference.
1616
let b = match y {
1717
Foo::Y(_, ref mut b) => b,
18-
//~^ WARNING cannot use `y`
19-
//~| WARNING this error has been downgraded to a warning
20-
//~| WARNING this warning will become a hard error in the future
18+
//~^ ERROR cannot use `y`
2119
Foo::X => panic!()
2220
};
2321

src/test/ui/borrowck/borrowck-anon-fields-variant.stderr

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning[E0503]: cannot use `y` because it was mutably borrowed
1+
error[E0503]: cannot use `y` because it was mutably borrowed
22
--> $DIR/borrowck-anon-fields-variant.rs:17:7
33
|
44
LL | Foo::Y(ref mut a, _) => a,
@@ -9,13 +9,9 @@ LL | Foo::Y(_, ref mut b) => b,
99
...
1010
LL | *a += 1;
1111
| ------- 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`
1612

1713
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
1915
|
2016
LL | Foo::Y(ref mut a, _) => a,
2117
| --------- borrow of `y.0` occurs here
@@ -27,7 +23,7 @@ LL | *a += 1;
2723
| ------- borrow later used here
2824

2925
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
3127
|
3228
LL | Foo::Y(ref mut a, _) => a,
3329
| --------- first mutable borrow occurs here
@@ -38,7 +34,7 @@ LL | Foo::Y(ref mut b, _) => b,
3834
LL | *a += 1;
3935
| ------- first borrow later used here
4036

41-
error: aborting due to 2 previous errors
37+
error: aborting due to 3 previous errors
4238

4339
Some errors have detailed explanations: E0499, E0503.
4440
For more information about an error, try `rustc --explain E0499`.

0 commit comments

Comments
 (0)