@@ -34,13 +34,13 @@ fn main() {
34
34
let ra = & u. a ;
35
35
let rma = & mut u. a ; //[ast]~ ERROR cannot borrow `u.a` as mutable because it is also borrowed as immutable
36
36
//[mir]~^ ERROR cannot borrow `u.a` as mutable because it is also borrowed as immutable (Ast)
37
- //[mir]~| ERROR cannot borrow `u.0 ` as mutable because it is also borrowed as immutable (Mir)
37
+ //[mir]~| ERROR cannot borrow `u.a ` as mutable because it is also borrowed as immutable (Mir)
38
38
}
39
39
{
40
40
let ra = & u. a ;
41
41
u. a = 1 ; //[ast]~ ERROR cannot assign to `u.a` because it is borrowed
42
42
//[mir]~^ ERROR cannot assign to `u.a` because it is borrowed (Ast)
43
- //[mir]~| ERROR cannot assign to `u.0 ` because it is borrowed (Mir)
43
+ //[mir]~| ERROR cannot assign to `u.a ` because it is borrowed (Mir)
44
44
}
45
45
// Imm borrow, other field
46
46
{
@@ -68,25 +68,25 @@ fn main() {
68
68
let rma = & mut u. a ;
69
69
let ra = & u. a ; //[ast]~ ERROR cannot borrow `u.a` as immutable because it is also borrowed as mutable
70
70
//[mir]~^ ERROR cannot borrow `u.a` as immutable because it is also borrowed as mutable (Ast)
71
- //[mir]~| ERROR cannot borrow `u.0 ` as immutable because it is also borrowed as mutable (Mir)
71
+ //[mir]~| ERROR cannot borrow `u.a ` as immutable because it is also borrowed as mutable (Mir)
72
72
}
73
73
{
74
74
let ra = & mut u. a ;
75
75
let a = u. a ; //[ast]~ ERROR cannot use `u.a` because it was mutably borrowed
76
76
//[mir]~^ ERROR cannot use `u.a` because it was mutably borrowed (Ast)
77
- //[mir]~| ERROR cannot use `u.0 ` because it was mutably borrowed (Mir)
77
+ //[mir]~| ERROR cannot use `u.a ` because it was mutably borrowed (Mir)
78
78
}
79
79
{
80
80
let rma = & mut u. a ;
81
81
let rma2 = & mut u. a ; //[ast]~ ERROR cannot borrow `u.a` as mutable more than once at a time
82
82
//[mir]~^ ERROR cannot borrow `u.a` as mutable more than once at a time (Ast)
83
- //[mir]~| ERROR cannot borrow `u.0 ` as mutable more than once at a time (Mir)
83
+ //[mir]~| ERROR cannot borrow `u.a ` as mutable more than once at a time (Mir)
84
84
}
85
85
{
86
86
let rma = & mut u. a ;
87
87
u. a = 1 ; //[ast]~ ERROR cannot assign to `u.a` because it is borrowed
88
88
//[mir]~^ ERROR cannot assign to `u.a` because it is borrowed (Ast)
89
- //[mir]~| ERROR cannot assign to `u.0 ` because it is borrowed (Mir)
89
+ //[mir]~| ERROR cannot assign to `u.a ` because it is borrowed (Mir)
90
90
}
91
91
// Mut borrow, other field
92
92
{
0 commit comments