1- error: cannot move out of `foo` because it is pinned
2- --> $DIR/borrow-unpin.rs:30:14
3- |
4- LL | foo_pin_mut(&pin mut foo); // ok
5- | ------------ pin of `foo` occurs here
6- LL | foo_move(foo);
7- | ^^^ move out of `foo` occurs here
8-
91error[E0505]: cannot move out of `foo` because it is borrowed
102 --> $DIR/borrow-unpin.rs:34:14
113 |
@@ -27,14 +19,6 @@ LL | struct Foo;
2719LL | let x = &pin mut foo;
2820 | --- you could clone this value
2921
30- error: cannot move out of `foo` because it is pinned
31- --> $DIR/borrow-unpin.rs:41:14
32- |
33- LL | foo_pin_mut(&pin mut foo); // ok
34- | ------------ pin of `foo` occurs here
35- LL | foo_move(foo);
36- | ^^^ move out of `foo` occurs here
37-
3822error[E0505]: cannot move out of `foo` because it is borrowed
3923 --> $DIR/borrow-unpin.rs:45:14
4024 |
@@ -56,14 +40,6 @@ LL | struct Foo;
5640LL | let x = &pin mut foo; // ok
5741 | --- you could clone this value
5842
59- error: cannot move out of `foo` because it is pinned
60- --> $DIR/borrow-unpin.rs:52:14
61- |
62- LL | foo_pin_ref(&pin const foo); // ok
63- | -------------- pin of `foo` occurs here
64- LL | foo_move(foo);
65- | ^^^ move out of `foo` occurs here
66-
6743error[E0505]: cannot move out of `foo` because it is borrowed
6844 --> $DIR/borrow-unpin.rs:56:14
6945 |
@@ -125,7 +101,7 @@ LL | foo_pin_ref(&pin const foo);
125101LL | foo_pin_mut(x);
126102 | - mutable borrow later used here
127103
128- error: aborting due to 10 previous errors
104+ error: aborting due to 7 previous errors
129105
130106Some errors have detailed explanations: E0499, E0502, E0505.
131107For more information about an error, try `rustc --explain E0499`.
0 commit comments