Skip to content

Commit 9738d7a

Browse files
pnkfelixmatthewjasper
authored andcommitted
update unit test output to reflect change to lint-based diagnostic.
1 parent 074f239 commit 9738d7a

3 files changed

+12
-10
lines changed

src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LL | v.extend(&v);
2020
| | immutable borrow later used by call
2121
| mutable borrow occurs here
2222

23-
warning[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
23+
warning: cannot borrow `v` as mutable because it is also borrowed as immutable
2424
--> $DIR/two-phase-reservation-sharing-interference-2.rs:42:5
2525
|
2626
LL | let shared = &v;
@@ -31,8 +31,9 @@ LL | v.push(shared.len());
3131
| |
3232
| mutable borrow occurs here
3333
|
34-
= warning: this error has been downgraded to a warning for backwards compatibility with previous releases
35-
= warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
34+
= note: #[warn(mutable_borrow_reservation_conflict)] on by default
35+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36+
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
3637

3738
error: aborting due to 2 previous errors
3839

src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LL | v.extend(&v);
2020
| | immutable borrow later used by call
2121
| mutable borrow occurs here
2222

23-
warning[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
23+
warning: cannot borrow `v` as mutable because it is also borrowed as immutable
2424
--> $DIR/two-phase-reservation-sharing-interference-2.rs:42:5
2525
|
2626
LL | let shared = &v;
@@ -31,8 +31,9 @@ LL | v.push(shared.len());
3131
| |
3232
| mutable borrow occurs here
3333
|
34-
= warning: this error has been downgraded to a warning for backwards compatibility with previous releases
35-
= warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
34+
= note: #[warn(mutable_borrow_reservation_conflict)] on by default
35+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36+
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
3637

3738
error: aborting due to 2 previous errors
3839

src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ fn reservation_conflict() {
4343
//[nll2015]~^ ERROR cannot borrow `v` as mutable
4444
//[nll2018]~^^ ERROR cannot borrow `v` as mutable
4545
//[migrate2015]~^^^ WARNING cannot borrow `v` as mutable
46-
//[migrate2015]~| WARNING this error has been downgraded to a warning
47-
//[migrate2015]~| WARNING this warning will become a hard error in the future
46+
//[migrate2015]~| WARNING will become a hard error in a future release
47+
4848
//[migrate2018]~^^^^^^ WARNING cannot borrow `v` as mutable
49-
//[migrate2018]~| WARNING this error has been downgraded to a warning
50-
//[migrate2018]~| WARNING this warning will become a hard error in the future
49+
//[migrate2018]~| WARNING will become a hard error in a future release
50+
5151
//[ast]~^^^^^^^^^ ERROR cannot borrow `v` as mutable
5252
}
5353

0 commit comments

Comments
 (0)