@@ -4,7 +4,7 @@ error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mu
44LL | let mut x = &mut v;
55 | - mutable borrow occurs here
66...
7- LL | borrow(&*v); //~ ERROR cannot borrow
7+ LL | borrow(&*v); //[ast] ~ ERROR cannot borrow
88 | ^^ immutable borrow occurs here
99LL | }
1010LL | }
@@ -16,7 +16,7 @@ error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mu
1616LL | let mut x = &mut v;
1717 | - mutable borrow occurs here
1818LL | for _ in 0..3 {
19- LL | borrow(&*v); //~ ERROR cannot borrow
19+ LL | borrow(&*v); //[ast] ~ ERROR cannot borrow
2020 | ^^ immutable borrow occurs here
2121...
2222LL | }
2525error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable
2626 --> $DIR/borrowck-lend-flow-loop.rs:57:25
2727 |
28- LL | borrow_mut(&mut *v); //~ ERROR cannot borrow
28+ LL | borrow_mut(&mut *v); //[ast] ~ ERROR cannot borrow
2929 | ^^ mutable borrow occurs here
3030LL | _x = &v;
3131 | - immutable borrow occurs here
3636error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable
3737 --> $DIR/borrowck-lend-flow-loop.rs:69:25
3838 |
39- LL | borrow_mut(&mut *v); //~ ERROR cannot borrow
39+ LL | borrow_mut(&mut *v); //[ast] ~ ERROR cannot borrow
4040 | ^^ mutable borrow occurs here
4141LL | _x = &v;
4242 | - immutable borrow occurs here
@@ -50,7 +50,7 @@ error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immu
5050LL | _x = &v;
5151 | - immutable borrow occurs here
5252...
53- LL | borrow_mut(&mut *v); //~ ERROR cannot borrow
53+ LL | borrow_mut(&mut *v); //[ast] ~ ERROR cannot borrow
5454 | ^^ mutable borrow occurs here
5555LL | }
5656 | - immutable borrow ends here
@@ -61,27 +61,27 @@ error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immu
6161LL | _x = &v;
6262 | - immutable borrow occurs here
6363...
64- LL | borrow_mut(&mut *v); //~ ERROR cannot borrow
64+ LL | borrow_mut(&mut *v); //[ast] ~ ERROR cannot borrow
6565 | ^^ mutable borrow occurs here
6666LL | }
6767 | - immutable borrow ends here
6868
6969error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mutable
7070 --> $DIR/borrowck-lend-flow-loop.rs:109:17
7171 |
72- LL | borrow(&*v); //~ ERROR cannot borrow
72+ LL | borrow(&*v); //[ast] ~ ERROR cannot borrow
7373 | ^^ immutable borrow occurs here
74- LL | if cond2 {
75- LL | x = &mut v; //~ ERROR cannot borrow
74+ ...
75+ LL | x = &mut v; //[ast] ~ ERROR cannot borrow
7676 | - mutable borrow occurs here
7777...
7878LL | }
7979 | - mutable borrow ends here
8080
8181error[E0499]: cannot borrow `v` as mutable more than once at a time
82- --> $DIR/borrowck-lend-flow-loop.rs:111 :22
82+ --> $DIR/borrowck-lend-flow-loop.rs:112 :22
8383 |
84- LL | x = &mut v; //~ ERROR cannot borrow
84+ LL | x = &mut v; //[ast] ~ ERROR cannot borrow
8585 | ^ mutable borrow starts here in previous iteration of loop
8686...
8787LL | }
0 commit comments