@@ -33,33 +33,36 @@ struct D {
3333fn copy_after_move ( ) {
3434 let a: Box < _ > = box A { x : box 0 , y : 1 } ;
3535 let _x = a. x ;
36- //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
37- let _y = a. y ; //~ ERROR use of moved value
38- //~^ NOTE value used here after move
36+ //~^ value moved here
37+ let _y = a. y ; //~ ERROR use of moved
38+ //~^ move occurs because `a.x` has type `std::boxed::Box<isize>`
39+ //~| value used here after move
3940}
4041
4142fn move_after_move ( ) {
4243 let a: Box < _ > = box B { x : box 0 , y : box 1 } ;
4344 let _x = a. x ;
44- //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
45+ //~^ value moved here
4546 let _y = a. y ; //~ ERROR use of moved
46- //~^ NOTE value used here after move
47+ //~^ move occurs because `a.x` has type `std::boxed::Box<isize>`
48+ //~| value used here after move
4749}
4850
4951fn borrow_after_move ( ) {
5052 let a: Box < _ > = box A { x : box 0 , y : 1 } ;
5153 let _x = a. x ;
52- //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
54+ //~^ value moved here
5355 let _y = & a. y ; //~ ERROR use of moved
54- //~^ NOTE value used here after move
56+ //~^ move occurs because `a.x` has type `std::boxed::Box<isize>`
57+ //~| value used here after move
5558}
5659
5760fn move_after_borrow ( ) {
5861 let a: Box < _ > = box B { x : box 0 , y : box 1 } ;
5962 let _x = & a. x ;
6063 let _y = a. y ;
6164 //~^ ERROR cannot move
62- //~| NOTE move out of
65+ //~| move out of
6366}
6467
6568fn copy_after_mut_borrow ( ) {
@@ -73,54 +76,54 @@ fn move_after_mut_borrow() {
7376 let _x = & mut a. x ;
7477 let _y = a. y ;
7578 //~^ ERROR cannot move
76- //~| NOTE move out of
79+ //~| move out of
7780}
7881
7982fn borrow_after_mut_borrow ( ) {
8083 let mut a: Box < _ > = box A { x : box 0 , y : 1 } ;
8184 let _x = & mut a. x ;
8285 let _y = & a. y ; //~ ERROR cannot borrow
83- //~^ NOTE immutable borrow occurs here (via `a.y`)
86+ //~^ immutable borrow occurs here (via `a.y`)
8487}
8588
8689fn mut_borrow_after_borrow ( ) {
8790 let mut a: Box < _ > = box A { x : box 0 , y : 1 } ;
8891 let _x = & a. x ;
8992 let _y = & mut a. y ; //~ ERROR cannot borrow
90- //~^ NOTE mutable borrow occurs here (via `a.y`)
93+ //~^ mutable borrow occurs here (via `a.y`)
9194}
9295
9396fn copy_after_move_nested ( ) {
9497 let a: Box < _ > = box C { x : box A { x : box 0 , y : 1 } , y : 2 } ;
9598 let _x = a. x . x ;
96- //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
99+ //~^ value moved here
97100 let _y = a. y ; //~ ERROR use of collaterally moved
98- //~^ NOTE value used here after move
101+ //~| value used here after move
99102}
100103
101104fn move_after_move_nested ( ) {
102105 let a: Box < _ > = box D { x : box A { x : box 0 , y : 1 } , y : box 2 } ;
103106 let _x = a. x . x ;
104- //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
107+ //~^ value moved here
105108 let _y = a. y ; //~ ERROR use of collaterally moved
106- //~^ NOTE value used here after move
109+ //~| value used here after move
107110}
108111
109112fn borrow_after_move_nested ( ) {
110113 let a: Box < _ > = box C { x : box A { x : box 0 , y : 1 } , y : 2 } ;
111114 let _x = a. x . x ;
112- //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
115+ //~^ value moved here
113116 let _y = & a. y ; //~ ERROR use of collaterally moved
114- //~^ NOTE value used here after move
117+ //~| value used here after move
115118}
116119
117120fn move_after_borrow_nested ( ) {
118121 let a: Box < _ > = box D { x : box A { x : box 0 , y : 1 } , y : box 2 } ;
119122 let _x = & a. x . x ;
120- //~^ NOTE borrow of `a.x.x` occurs here
123+ //~^ borrow of `a.x.x` occurs here
121124 let _y = a. y ;
122125 //~^ ERROR cannot move
123- //~| NOTE move out of
126+ //~| move out of
124127}
125128
126129fn copy_after_mut_borrow_nested ( ) {
@@ -134,23 +137,23 @@ fn move_after_mut_borrow_nested() {
134137 let _x = & mut a. x . x ;
135138 let _y = a. y ;
136139 //~^ ERROR cannot move
137- //~| NOTE move out of
140+ //~| move out of
138141}
139142
140143fn borrow_after_mut_borrow_nested ( ) {
141144 let mut a: Box < _ > = box C { x : box A { x : box 0 , y : 1 } , y : 2 } ;
142145 let _x = & mut a. x . x ;
143- //~^ NOTE mutable borrow occurs here
146+ //~^ mutable borrow occurs here
144147 let _y = & a. y ; //~ ERROR cannot borrow
145- //~^ NOTE immutable borrow occurs here
148+ //~^ immutable borrow occurs here
146149}
147150
148151fn mut_borrow_after_borrow_nested ( ) {
149152 let mut a: Box < _ > = box C { x : box A { x : box 0 , y : 1 } , y : 2 } ;
150153 let _x = & a. x . x ;
151- //~^ NOTE immutable borrow occurs here
154+ //~^ immutable borrow occurs here
152155 let _y = & mut a. y ; //~ ERROR cannot borrow
153- //~^ NOTE mutable borrow occurs here
156+ //~^ mutable borrow occurs here
154157}
155158
156159fn main ( ) {
0 commit comments