1 error[E0506]: cannot assign to `v[_]` because it is borrowed
2 --> $DIR/drop-no-may-dangle.rs:20:9
4 LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] };
5 | ----- borrow of `v[_]` occurs here
8 | ^^^^^^^^^ assignment to borrowed `v[_]` occurs here
11 | - borrow might be used here, when `p` is dropped and runs the `Drop` code for type `WrapMayNotDangle`
13 error[E0506]: cannot assign to `v[_]` because it is borrowed
14 --> $DIR/drop-no-may-dangle.rs:23:5
16 LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] };
17 | ----- borrow of `v[_]` occurs here
20 | ^^^^^^^^^ assignment to borrowed `v[_]` occurs here
22 | - borrow might be used here, when `p` is dropped and runs the `Drop` code for type `WrapMayNotDangle`
24 error: aborting due to 2 previous errors
26 For more information about this error, try `rustc --explain E0506`.