@@ -4,7 +4,7 @@ error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mu
4
4
LL | let mut x = &mut v;
5
5
| - mutable borrow occurs here
6
6
...
7
- LL | borrow(&*v); //~ ERROR cannot borrow
7
+ LL | borrow(&*v); //[ast] ~ ERROR cannot borrow
8
8
| ^^ immutable borrow occurs here
9
9
LL | }
10
10
LL | }
@@ -16,7 +16,7 @@ error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mu
16
16
LL | let mut x = &mut v;
17
17
| - mutable borrow occurs here
18
18
LL | for _ in 0..3 {
19
- LL | borrow(&*v); //~ ERROR cannot borrow
19
+ LL | borrow(&*v); //[ast] ~ ERROR cannot borrow
20
20
| ^^ immutable borrow occurs here
21
21
...
22
22
LL | }
25
25
error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable
26
26
--> $DIR/borrowck-lend-flow-loop.rs:57:25
27
27
|
28
- LL | borrow_mut(&mut *v); //~ ERROR cannot borrow
28
+ LL | borrow_mut(&mut *v); //[ast] ~ ERROR cannot borrow
29
29
| ^^ mutable borrow occurs here
30
30
LL | _x = &v;
31
31
| - immutable borrow occurs here
36
36
error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable
37
37
--> $DIR/borrowck-lend-flow-loop.rs:69:25
38
38
|
39
- LL | borrow_mut(&mut *v); //~ ERROR cannot borrow
39
+ LL | borrow_mut(&mut *v); //[ast] ~ ERROR cannot borrow
40
40
| ^^ mutable borrow occurs here
41
41
LL | _x = &v;
42
42
| - immutable borrow occurs here
@@ -50,7 +50,7 @@ error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immu
50
50
LL | _x = &v;
51
51
| - immutable borrow occurs here
52
52
...
53
- LL | borrow_mut(&mut *v); //~ ERROR cannot borrow
53
+ LL | borrow_mut(&mut *v); //[ast] ~ ERROR cannot borrow
54
54
| ^^ mutable borrow occurs here
55
55
LL | }
56
56
| - immutable borrow ends here
@@ -61,27 +61,27 @@ error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immu
61
61
LL | _x = &v;
62
62
| - immutable borrow occurs here
63
63
...
64
- LL | borrow_mut(&mut *v); //~ ERROR cannot borrow
64
+ LL | borrow_mut(&mut *v); //[ast] ~ ERROR cannot borrow
65
65
| ^^ mutable borrow occurs here
66
66
LL | }
67
67
| - immutable borrow ends here
68
68
69
69
error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mutable
70
70
--> $DIR/borrowck-lend-flow-loop.rs:109:17
71
71
|
72
- LL | borrow(&*v); //~ ERROR cannot borrow
72
+ LL | borrow(&*v); //[ast] ~ ERROR cannot borrow
73
73
| ^^ 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
76
76
| - mutable borrow occurs here
77
77
...
78
78
LL | }
79
79
| - mutable borrow ends here
80
80
81
81
error[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
83
83
|
84
- LL | x = &mut v; //~ ERROR cannot borrow
84
+ LL | x = &mut v; //[ast] ~ ERROR cannot borrow
85
85
| ^ mutable borrow starts here in previous iteration of loop
86
86
...
87
87
LL | }
0 commit comments