@@ -7,32 +7,68 @@ LL | let _pin = &pin mut pair.0;
77LL | let _borrow = &mut pair.0;
88 | ^^^^^^^^^^^ borrow of `pair.0` as mutable occurs here
99
10+ error: cannot borrow `pair.0` as mutable because it is pinned
11+ --> $DIR/borrow-pinned-projection.rs:32:19
12+ |
13+ LL | let ref pin mut _pin = pair.0;
14+ | ---------------- pin of `pair.0` occurs here
15+ ...
16+ LL | let _borrow = &mut pair.0;
17+ | ^^^^^^^^^^^ borrow of `pair.0` as mutable occurs here
18+
1019error: cannot move out of `pair.0` because it is pinned
11- --> $DIR/borrow-pinned-projection.rs:32 :18
20+ --> $DIR/borrow-pinned-projection.rs:44 :18
1221 |
1322LL | let _pin = &pin mut pair.0;
1423 | --------------- pin of `pair.0` occurs here
1524...
1625LL | let _moved = pair.0;
1726 | ^^^^^^ move out of `pair.0` occurs here
1827
28+ error: cannot move out of `pair.0` because it is pinned
29+ --> $DIR/borrow-pinned-projection.rs:56:18
30+ |
31+ LL | let ref pin mut _pin = pair.0;
32+ | ---------------- pin of `pair.0` occurs here
33+ ...
34+ LL | let _moved = pair.0;
35+ | ^^^^^^ move out of `pair.0` occurs here
36+
1937error: cannot move out of `value.field` because it is pinned
20- --> $DIR/borrow-pinned-projection.rs:47 :18
38+ --> $DIR/borrow-pinned-projection.rs:71 :18
2139 |
2240LL | let _ = &pin mut value;
2341 | -------------- pin of `value` occurs here
2442...
2543LL | let _moved = value.field;
2644 | ^^^^^^^^^^^ move out of `value.field` occurs here
2745
46+ error: cannot move out of `value.field` because it is pinned
47+ --> $DIR/borrow-pinned-projection.rs:80:18
48+ |
49+ LL | let ref pin mut _pin = value;
50+ | ---------------- pin of `value` occurs here
51+ ...
52+ LL | let _moved = value.field;
53+ | ^^^^^^^^^^^ move out of `value.field` occurs here
54+
2855error: cannot borrow `value.field` as mutable because it is pinned
29- --> $DIR/borrow-pinned-projection.rs:56 :13
56+ --> $DIR/borrow-pinned-projection.rs:89 :13
3057 |
3158LL | let _ = &pin mut value;
3259 | -------------- pin of `value` occurs here
3360...
3461LL | let _ = &mut value.field;
3562 | ^^^^^^^^^^^^^^^^ borrow of `value.field` as mutable occurs here
3663
37- error: aborting due to 4 previous errors
64+ error: cannot borrow `value.field` as mutable because it is pinned
65+ --> $DIR/borrow-pinned-projection.rs:98:13
66+ |
67+ LL | let ref pin mut _pin = value;
68+ | ---------------- pin of `value` occurs here
69+ ...
70+ LL | let _ = &mut value.field;
71+ | ^^^^^^^^^^^^^^^^ borrow of `value.field` as mutable occurs here
72+
73+ error: aborting due to 8 previous errors
3874
0 commit comments