We aren't sure if this will become an error or not yet.
"once this method is added to the standard library, \
the ambiguity may cause an error or change in behavior!"
.to_owned()
"once this method is added to the standard library, \
the ambiguity may cause an error or change in behavior!"
.to_owned()
+ } else if lint_id == LintId::of(crate::lint::builtin::MUTABLE_BORROW_RESERVATION_CONFLICT) {
+ "this borrowing pattern was not meant to be accepted, \
+ and may become a hard error in the future"
+ .to_owned()
} else if let Some(edition) = future_incompatible.edition {
format!("{} in the {} edition!", STANDARD_MESSAGE, edition)
} else {
} else if let Some(edition) = future_incompatible.edition {
format!("{} in the {} edition!", STANDARD_MESSAGE, edition)
} else {
| mutable borrow occurs here
|
= note: #[warn(mutable_borrow_reservation_conflict)] on by default
| mutable borrow occurs here
|
= 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!
+ = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: aborting due to 2 previous errors
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: aborting due to 2 previous errors
| mutable borrow occurs here
|
= note: #[warn(mutable_borrow_reservation_conflict)] on by default
| mutable borrow occurs here
|
= 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!
+ = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: aborting due to 2 previous errors
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: aborting due to 2 previous errors
//[nll2015]~^ ERROR cannot borrow `v` as mutable
//[nll2018]~^^ ERROR cannot borrow `v` as mutable
//[migrate2015]~^^^ WARNING cannot borrow `v` as mutable
//[nll2015]~^ ERROR cannot borrow `v` as mutable
//[nll2018]~^^ ERROR cannot borrow `v` as mutable
//[migrate2015]~^^^ WARNING cannot borrow `v` as mutable
- //[migrate2015]~| WARNING will become a hard error in a future release
+ //[migrate2015]~| WARNING may become a hard error in the future
//[migrate2018]~^^^^^^ WARNING cannot borrow `v` as mutable
//[migrate2018]~^^^^^^ WARNING cannot borrow `v` as mutable
- //[migrate2018]~| WARNING will become a hard error in a future release
+ //[migrate2018]~| WARNING may become a hard error in the future
//[ast]~^^^^^^^^^ ERROR cannot borrow `v` as mutable
}
//[ast]~^^^^^^^^^ ERROR cannot borrow `v` as mutable
}
v.push(shared.len());
//~^ WARNING cannot borrow `v` as mutable
v.push(shared.len());
//~^ WARNING cannot borrow `v` as mutable
- //~| WARNING will become a hard error in a future release
+ //~| WARNING may become a hard error in the future
v.push(shared.len());
//~^ ERROR cannot borrow `v` as mutable
v.push(shared.len());
//~^ ERROR cannot borrow `v` as mutable
- //~| WARNING will become a hard error in a future release
+ //~| WARNING may become a hard error in the future
|
LL | #![warn(mutable_borrow_reservation_conflict)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
LL | #![warn(mutable_borrow_reservation_conflict)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: cannot borrow `v` as mutable because it is also borrowed as immutable
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: cannot borrow `v` as mutable because it is also borrowed as immutable
|
LL | #![deny(mutable_borrow_reservation_conflict)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
LL | #![deny(mutable_borrow_reservation_conflict)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: aborting due to previous error
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: aborting due to previous error