@@ -33,36 +33,33 @@ struct D {
3333fn copy_after_move ( ) {
3434 let a: Box < _ > = box A { x : box 0 , y : 1 } ;
3535 let _x = a. x ;
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
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
4039}
4140
4241fn move_after_move ( ) {
4342 let a: Box < _ > = box B { x : box 0 , y : box 1 } ;
4443 let _x = a. x ;
45- //~^ value moved here
44+ //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
4645 let _y = a. y ; //~ ERROR use of moved
47- //~^ move occurs because `a.x` has type `std::boxed::Box<isize>`
48- //~| value used here after move
46+ //~^ NOTE value used here after move
4947}
5048
5149fn borrow_after_move ( ) {
5250 let a: Box < _ > = box A { x : box 0 , y : 1 } ;
5351 let _x = a. x ;
54- //~^ value moved here
52+ //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
5553 let _y = & a. y ; //~ ERROR use of moved
56- //~^ move occurs because `a.x` has type `std::boxed::Box<isize>`
57- //~| value used here after move
54+ //~^ NOTE value used here after move
5855}
5956
6057fn move_after_borrow ( ) {
6158 let a: Box < _ > = box B { x : box 0 , y : box 1 } ;
6259 let _x = & a. x ;
6360 let _y = a. y ;
6461 //~^ ERROR cannot move
65- //~| move out of
62+ //~| NOTE move out of
6663}
6764
6865fn copy_after_mut_borrow ( ) {
@@ -76,54 +73,54 @@ fn move_after_mut_borrow() {
7673 let _x = & mut a. x ;
7774 let _y = a. y ;
7875 //~^ ERROR cannot move
79- //~| move out of
76+ //~| NOTE move out of
8077}
8178
8279fn borrow_after_mut_borrow ( ) {
8380 let mut a: Box < _ > = box A { x : box 0 , y : 1 } ;
8481 let _x = & mut a. x ;
8582 let _y = & a. y ; //~ ERROR cannot borrow
86- //~^ immutable borrow occurs here (via `a.y`)
83+ //~^ NOTE immutable borrow occurs here (via `a.y`)
8784}
8885
8986fn mut_borrow_after_borrow ( ) {
9087 let mut a: Box < _ > = box A { x : box 0 , y : 1 } ;
9188 let _x = & a. x ;
9289 let _y = & mut a. y ; //~ ERROR cannot borrow
93- //~^ mutable borrow occurs here (via `a.y`)
90+ //~^ NOTE mutable borrow occurs here (via `a.y`)
9491}
9592
9693fn copy_after_move_nested ( ) {
9794 let a: Box < _ > = box C { x : box A { x : box 0 , y : 1 } , y : 2 } ;
9895 let _x = a. x . x ;
99- //~^ value moved here
96+ //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
10097 let _y = a. y ; //~ ERROR use of collaterally moved
101- //~| value used here after move
98+ //~^ NOTE value used here after move
10299}
103100
104101fn move_after_move_nested ( ) {
105102 let a: Box < _ > = box D { x : box A { x : box 0 , y : 1 } , y : box 2 } ;
106103 let _x = a. x . x ;
107- //~^ value moved here
104+ //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
108105 let _y = a. y ; //~ ERROR use of collaterally moved
109- //~| value used here after move
106+ //~^ NOTE value used here after move
110107}
111108
112109fn borrow_after_move_nested ( ) {
113110 let a: Box < _ > = box C { x : box A { x : box 0 , y : 1 } , y : 2 } ;
114111 let _x = a. x . x ;
115- //~^ value moved here
112+ //~^ NOTE value moved here because it has type `std::boxed::Box<isize>`, which does not
116113 let _y = & a. y ; //~ ERROR use of collaterally moved
117- //~| value used here after move
114+ //~^ NOTE value used here after move
118115}
119116
120117fn move_after_borrow_nested ( ) {
121118 let a: Box < _ > = box D { x : box A { x : box 0 , y : 1 } , y : box 2 } ;
122119 let _x = & a. x . x ;
123- //~^ borrow of `a.x.x` occurs here
120+ //~^ NOTE borrow of `a.x.x` occurs here
124121 let _y = a. y ;
125122 //~^ ERROR cannot move
126- //~| move out of
123+ //~| NOTE move out of
127124}
128125
129126fn copy_after_mut_borrow_nested ( ) {
@@ -137,23 +134,23 @@ fn move_after_mut_borrow_nested() {
137134 let _x = & mut a. x . x ;
138135 let _y = a. y ;
139136 //~^ ERROR cannot move
140- //~| move out of
137+ //~| NOTE move out of
141138}
142139
143140fn borrow_after_mut_borrow_nested ( ) {
144141 let mut a: Box < _ > = box C { x : box A { x : box 0 , y : 1 } , y : 2 } ;
145142 let _x = & mut a. x . x ;
146- //~^ mutable borrow occurs here
143+ //~^ NOTE mutable borrow occurs here
147144 let _y = & a. y ; //~ ERROR cannot borrow
148- //~^ immutable borrow occurs here
145+ //~^ NOTE immutable borrow occurs here
149146}
150147
151148fn mut_borrow_after_borrow_nested ( ) {
152149 let mut a: Box < _ > = box C { x : box A { x : box 0 , y : 1 } , y : 2 } ;
153150 let _x = & a. x . x ;
154- //~^ immutable borrow occurs here
151+ //~^ NOTE immutable borrow occurs here
155152 let _y = & mut a. y ; //~ ERROR cannot borrow
156- //~^ mutable borrow occurs here
153+ //~^ NOTE mutable borrow occurs here
157154}
158155
159156fn main ( ) {
0 commit comments