]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-20801.nll.stderr
Regression test for issue #54477.
[rust.git] / src / test / ui / issues / issue-20801.nll.stderr
1 error[E0507]: cannot move out of borrowed content
2   --> $DIR/issue-20801.rs:36:22
3    |
4 LL |     let a = unsafe { *mut_ref() };
5    |                      ^^^^^^^^^^
6    |                      |
7    |                      cannot move out of borrowed content
8    |                      help: consider removing the `*`: `mut_ref()`
9
10 error[E0507]: cannot move out of borrowed content
11   --> $DIR/issue-20801.rs:39:22
12    |
13 LL |     let b = unsafe { *imm_ref() };
14    |                      ^^^^^^^^^^
15    |                      |
16    |                      cannot move out of borrowed content
17    |                      help: consider removing the `*`: `imm_ref()`
18
19 error[E0507]: cannot move out of data in a `&` reference
20   --> $DIR/issue-20801.rs:39:22
21    |
22 LL |     let b = unsafe { *imm_ref() };
23    |                      ^^^^^^^^^^
24    |                      |
25    |                      cannot move out of data in a `&` reference
26    |                      cannot move
27
28 error[E0507]: cannot move out of dereference of raw pointer
29   --> $DIR/issue-20801.rs:42:22
30    |
31 LL |     let c = unsafe { *mut_ptr() };
32    |                      ^^^^^^^^^^
33    |                      |
34    |                      cannot move out of dereference of raw pointer
35    |                      help: consider removing the `*`: `mut_ptr()`
36
37 error[E0507]: cannot move out of dereference of raw pointer
38   --> $DIR/issue-20801.rs:45:22
39    |
40 LL |     let d = unsafe { *const_ptr() };
41    |                      ^^^^^^^^^^^^
42    |                      |
43    |                      cannot move out of dereference of raw pointer
44    |                      help: consider removing the `*`: `const_ptr()`
45
46 error[E0507]: cannot move out of data in a `*const` pointer
47   --> $DIR/issue-20801.rs:45:22
48    |
49 LL |     let d = unsafe { *const_ptr() };
50    |                      ^^^^^^^^^^^^
51    |                      |
52    |                      cannot move out of data in a `*const` pointer
53    |                      cannot move
54
55 error: aborting due to 6 previous errors
56
57 For more information about this error, try `rustc --explain E0507`.