11error: cannot move out of `foo` because it is pinned
2- --> $DIR/borrow-unpin.rs:30 :14
2+ --> $DIR/borrow-unpin.rs:29 :14
33 |
44LL | foo_pin_mut(&pin mut foo); // ok
55 | ------------ pin of `foo` occurs here
66LL | foo_move(foo);
77 | ^^^ move out of `foo` occurs here
88
99error[E0505]: cannot move out of `foo` because it is borrowed
10- --> $DIR/borrow-unpin.rs:34 :14
10+ --> $DIR/borrow-unpin.rs:33 :14
1111 |
1212LL | let mut foo = Foo::default();
1313 | ------- binding `foo` declared here
@@ -19,7 +19,7 @@ LL | foo_pin_mut(x); // ok
1919 | - borrow later used here
2020 |
2121note: if `Foo` implemented `Clone`, you could clone the value
22- --> $DIR/borrow-unpin.rs:14 :1
22+ --> $DIR/borrow-unpin.rs:13 :1
2323 |
2424LL | struct Foo(PhantomPinned);
2525 | ^^^^^^^^^^ consider implementing `Clone` for this type
@@ -28,15 +28,15 @@ LL | let x = &pin mut foo;
2828 | --- you could clone this value
2929
3030error: cannot move out of `foo` because it is pinned
31- --> $DIR/borrow-unpin.rs:41 :14
31+ --> $DIR/borrow-unpin.rs:40 :14
3232 |
3333LL | foo_pin_mut(&pin mut foo); // ok
3434 | ------------ pin of `foo` occurs here
3535LL | foo_move(foo);
3636 | ^^^ move out of `foo` occurs here
3737
3838error[E0505]: cannot move out of `foo` because it is borrowed
39- --> $DIR/borrow-unpin.rs:45 :14
39+ --> $DIR/borrow-unpin.rs:44 :14
4040 |
4141LL | let mut foo = Foo::default();
4242 | ------- binding `foo` declared here
@@ -48,7 +48,7 @@ LL | foo_pin_mut(x); // ok
4848 | - borrow later used here
4949 |
5050note: if `Foo` implemented `Clone`, you could clone the value
51- --> $DIR/borrow-unpin.rs:14 :1
51+ --> $DIR/borrow-unpin.rs:13 :1
5252 |
5353LL | struct Foo(PhantomPinned);
5454 | ^^^^^^^^^^ consider implementing `Clone` for this type
@@ -57,15 +57,15 @@ LL | let x = &pin mut foo; // ok
5757 | --- you could clone this value
5858
5959error: cannot move out of `foo` because it is pinned
60- --> $DIR/borrow-unpin.rs:52 :14
60+ --> $DIR/borrow-unpin.rs:51 :14
6161 |
6262LL | foo_pin_ref(&pin const foo); // ok
6363 | -------------- pin of `foo` occurs here
6464LL | foo_move(foo);
6565 | ^^^ move out of `foo` occurs here
6666
6767error[E0505]: cannot move out of `foo` because it is borrowed
68- --> $DIR/borrow-unpin.rs:56 :14
68+ --> $DIR/borrow-unpin.rs:55 :14
6969 |
7070LL | let foo = Foo::default();
7171 | --- binding `foo` declared here
@@ -77,7 +77,7 @@ LL | foo_pin_ref(x);
7777 | - borrow later used here
7878 |
7979note: if `Foo` implemented `Clone`, you could clone the value
80- --> $DIR/borrow-unpin.rs:14 :1
80+ --> $DIR/borrow-unpin.rs:13 :1
8181 |
8282LL | struct Foo(PhantomPinned);
8383 | ^^^^^^^^^^ consider implementing `Clone` for this type
@@ -86,7 +86,7 @@ LL | let x = &pin const foo; // ok
8686 | --- you could clone this value
8787
8888error: cannot move out of `foo` because it is pinned
89- --> $DIR/borrow-unpin.rs:65 :14
89+ --> $DIR/borrow-unpin.rs:64 :14
9090 |
9191LL | let ref pin mut _x = foo;
9292 | -------------- pin of `foo` occurs here
@@ -95,7 +95,7 @@ LL | foo_move(foo);
9595 | ^^^ move out of `foo` occurs here
9696
9797error: cannot borrow `foo` as mutable because it is pinned
98- --> $DIR/borrow-unpin.rs:73 :13
98+ --> $DIR/borrow-unpin.rs:72 :13
9999 |
100100LL | let ref pin mut _x = foo;
101101 | -------------- pin of `foo` occurs here
@@ -104,7 +104,7 @@ LL | foo_mut(&mut foo);
104104 | ^^^^^^^^ borrow of `foo` as mutable occurs here
105105
106106error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable
107- --> $DIR/borrow-unpin.rs:83 :13
107+ --> $DIR/borrow-unpin.rs:82 :13
108108 |
109109LL | let x = &pin mut foo; // ok
110110 | ------------ mutable borrow occurs here
@@ -114,7 +114,7 @@ LL | foo_pin_mut(x);
114114 | - mutable borrow later used here
115115
116116error[E0499]: cannot borrow `foo` as mutable more than once at a time
117- --> $DIR/borrow-unpin.rs:105 :17
117+ --> $DIR/borrow-unpin.rs:104 :17
118118 |
119119LL | let x = &pin mut foo; // ok
120120 | ------------ first mutable borrow occurs here
@@ -124,7 +124,7 @@ LL | foo_pin_mut(x);
124124 | - first borrow later used here
125125
126126error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immutable
127- --> $DIR/borrow-unpin.rs:116 :17
127+ --> $DIR/borrow-unpin.rs:115 :17
128128 |
129129LL | let x = &pin const foo; // ok
130130 | -------------- immutable borrow occurs here
@@ -134,7 +134,7 @@ LL | foo_pin_ref(x);
134134 | - immutable borrow later used here
135135
136136error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable
137- --> $DIR/borrow-unpin.rs:127 :17
137+ --> $DIR/borrow-unpin.rs:126 :17
138138 |
139139LL | let x = &pin mut foo; // ok
140140 | ------------ mutable borrow occurs here
0 commit comments