update unit test output to reflect change to lint-based diagnostic.

This commit is contained in:
Felix S. Klock II 2019-03-13 20:17:59 +01:00 committed by Matthew Jasper
parent 074f239781
commit 9738d7acd8
3 changed files with 12 additions and 10 deletions

View file

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

View file

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

View file

@ -43,11 +43,11 @@ fn reservation_conflict() {
//[nll2015]~^ ERROR cannot borrow `v` as mutable
//[nll2018]~^^ ERROR cannot borrow `v` as mutable
//[migrate2015]~^^^ WARNING cannot borrow `v` as mutable
//[migrate2015]~| WARNING this error has been downgraded to a warning
//[migrate2015]~| WARNING this warning will become a hard error in the future
//[migrate2015]~| WARNING will become a hard error in a future release
//[migrate2018]~^^^^^^ WARNING cannot borrow `v` as mutable
//[migrate2018]~| WARNING this error has been downgraded to a warning
//[migrate2018]~| WARNING this warning will become a hard error in the future
//[migrate2018]~| WARNING will become a hard error in a future release
//[ast]~^^^^^^^^^ ERROR cannot borrow `v` as mutable
}