fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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