1 // Test for #56254. The last example originally failed with the ast checker, was
2 // accidentally allowed under migrate/nll, then linted against in migrate mode
3 // but disallowed under NLL. Now, we accept it everywhere.
5 //ignore-compare-mode-polonius
7 fn double_conflicts() {
8 let mut v = vec![0, 1, 2];
12 //~^ ERROR cannot borrow `v` as mutable
15 fn activation_conflict() {
16 let mut v = vec![0, 1, 2];
19 //~^ ERROR cannot borrow `v` as mutable
22 fn reservation_allowed() {
23 let mut v = vec![0, 1, 2];