From 9738d7acd83a9dcf75eea0d7252314d10a1f45c8 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 13 Mar 2019 20:17:59 +0100 Subject: [PATCH] update unit test output to reflect change to lint-based diagnostic. --- ...-reservation-sharing-interference-2.migrate2015.stderr | 7 ++++--- ...-reservation-sharing-interference-2.migrate2018.stderr | 7 ++++--- .../two-phase-reservation-sharing-interference-2.rs | 8 ++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr index bfb291107423..c4756490e5d8 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr @@ -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 error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr index bfb291107423..c4756490e5d8 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr @@ -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 error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.rs b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.rs index c15521a32a90..e658b6c1083a 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.rs +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.rs @@ -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 }