11error: cannot move out of `foo` because it is pinned
2- --> $DIR/borrow-unpin.rs:28 :14
2+ --> $DIR/borrow-unpin.rs:30 :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:32 :14
10+ --> $DIR/borrow-unpin.rs:34 :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:13 :1
22+ --> $DIR/borrow-unpin.rs:14 :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:39 :14
31+ --> $DIR/borrow-unpin.rs:41 :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:43 :14
39+ --> $DIR/borrow-unpin.rs:45 :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:13 :1
51+ --> $DIR/borrow-unpin.rs:14 :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:50 :14
60+ --> $DIR/borrow-unpin.rs:52 :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:54 :14
68+ --> $DIR/borrow-unpin.rs:56 :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:13 :1
80+ --> $DIR/borrow-unpin.rs:14 :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[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable
89- --> $DIR/borrow-unpin.rs:65 :13
89+ --> $DIR/borrow-unpin.rs:67 :13
9090 |
9191LL | let x = &pin mut foo; // ok
9292 | ------------ mutable borrow occurs here
@@ -96,7 +96,7 @@ LL | foo_pin_mut(x);
9696 | - mutable borrow later used here
9797
9898error[E0499]: cannot borrow `foo` as mutable more than once at a time
99- --> $DIR/borrow-unpin.rs:87 :17
99+ --> $DIR/borrow-unpin.rs:89 :17
100100 |
101101LL | let x = &pin mut foo; // ok
102102 | ------------ first mutable borrow occurs here
@@ -106,7 +106,7 @@ LL | foo_pin_mut(x);
106106 | - first borrow later used here
107107
108108error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immutable
109- --> $DIR/borrow-unpin.rs:98 :17
109+ --> $DIR/borrow-unpin.rs:100 :17
110110 |
111111LL | let x = &pin const foo; // ok
112112 | -------------- immutable borrow occurs here
@@ -116,7 +116,7 @@ LL | foo_pin_ref(x);
116116 | - immutable borrow later used here
117117
118118error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable
119- --> $DIR/borrow-unpin.rs:109 :17
119+ --> $DIR/borrow-unpin.rs:111 :17
120120 |
121121LL | let x = &pin mut foo; // ok
122122 | ------------ mutable borrow occurs here
0 commit comments