1 error[E0507]: cannot move out of a mutable reference
2 --> $DIR/issue-20801.rs:26:22
4 LL | let a = unsafe { *mut_ref() };
5 | ^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
7 help: consider removing the dereference here
9 LL - let a = unsafe { *mut_ref() };
10 LL + let a = unsafe { mut_ref() };
13 error[E0507]: cannot move out of a shared reference
14 --> $DIR/issue-20801.rs:29:22
16 LL | let b = unsafe { *imm_ref() };
17 | ^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
19 help: consider removing the dereference here
21 LL - let b = unsafe { *imm_ref() };
22 LL + let b = unsafe { imm_ref() };
25 error[E0507]: cannot move out of a raw pointer
26 --> $DIR/issue-20801.rs:32:22
28 LL | let c = unsafe { *mut_ptr() };
29 | ^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
31 help: consider removing the dereference here
33 LL - let c = unsafe { *mut_ptr() };
34 LL + let c = unsafe { mut_ptr() };
37 error[E0507]: cannot move out of a raw pointer
38 --> $DIR/issue-20801.rs:35:22
40 LL | let d = unsafe { *const_ptr() };
41 | ^^^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
43 help: consider removing the dereference here
45 LL - let d = unsafe { *const_ptr() };
46 LL + let d = unsafe { const_ptr() };
49 error: aborting due to 4 previous errors
51 For more information about this error, try `rustc --explain E0507`.