2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of a mutable reference
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-20801.rs:26:22
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | let a = unsafe { *mut_ref() };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let a = unsafe { *mut_ref() };
|
|
|
|
LL + let a = unsafe { mut_ref() };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-15 21:11:54 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of a shared reference
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-20801.rs:29:22
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | let b = unsafe { *imm_ref() };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let b = unsafe { *imm_ref() };
|
|
|
|
LL + let b = unsafe { imm_ref() };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-15 21:11:54 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of a raw pointer
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-20801.rs:32:22
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | let c = unsafe { *mut_ptr() };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let c = unsafe { *mut_ptr() };
|
|
|
|
LL + let c = unsafe { mut_ptr() };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-15 21:11:54 +00:00
|
|
|
|
2019-05-05 11:02:32 +00:00
|
|
|
error[E0507]: cannot move out of a raw pointer
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-20801.rs:35:22
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | let d = unsafe { *const_ptr() };
|
2022-12-08 17:02:54 +00:00
|
|
|
| ^^^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-09 21:01:41 +00:00
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let d = unsafe { *const_ptr() };
|
|
|
|
LL + let d = unsafe { const_ptr() };
|
2022-12-08 17:02:54 +00:00
|
|
|
|
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0507`.
|