fork/rust
git clone https://git.julia.blue/fork/rust
5e1a799842b
1.41.0
1error[E0507]: cannot move out of a mutable reference 2 --> $DIR/issue-20801.rs:26:22 3 | 4LL | let a = unsafe { *mut_ref() }; 5 | ^^^^^^^^^^ 6 | | 7 | move occurs because value has type `T`, which does not implement the `Copy` trait 8 | help: consider borrowing here: `&*mut_ref()` 9 10error[E0507]: cannot move out of a shared reference 11 --> $DIR/issue-20801.rs:29:22 12 | 13LL | let b = unsafe { *imm_ref() }; 14 | ^^^^^^^^^^ 15 | | 16 | move occurs because value has type `T`, which does not implement the `Copy` trait 17 | help: consider borrowing here: `&*imm_ref()` 18 19error[E0507]: cannot move out of a raw pointer 20 --> $DIR/issue-20801.rs:32:22 21 | 22LL | let c = unsafe { *mut_ptr() }; 23 | ^^^^^^^^^^ 24 | | 25 | move occurs because value has type `T`, which does not implement the `Copy` trait 26 | help: consider borrowing here: `&*mut_ptr()` 27 28error[E0507]: cannot move out of a raw pointer 29 --> $DIR/issue-20801.rs:35:22 30 | 31LL | let d = unsafe { *const_ptr() }; 32 | ^^^^^^^^^^^^ 33 | | 34 | move occurs because value has type `T`, which does not implement the `Copy` trait 35 | help: consider borrowing here: `&*const_ptr()` 36 37error: aborting due to 4 previous errors 38 39For more information about this error, try `rustc --explain E0507`.