Static rustc_ap_rustc_lint_defs::builtin::MUTABLE_BORROW_RESERVATION_CONFLICT [−][src]
pub static MUTABLE_BORROW_RESERVATION_CONFLICT: &Lint
Expand description
The mutable_borrow_reservation_conflict
lint detects the reservation
of a two-phased borrow that conflicts with other shared borrows.
Example
let mut v = vec![0, 1, 2]; let shared = &v; v.push(shared.len());
{{produces}}
Explanation
This is a future-incompatible lint to transition this to a hard error in the future. See issue #59159 for a complete description of the problem, and some possible solutions.