]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / borrowck / borrowck-move-from-unsafe-ptr.nll.stderr
1 error[E0507]: cannot move out of dereference of raw pointer
2   --> $DIR/borrowck-move-from-unsafe-ptr.rs:13:13
3    |
4 LL |     let y = *x; //~ ERROR cannot move out of dereference of raw pointer
5    |             ^^
6    |             |
7    |             cannot move out of dereference of raw pointer
8    |             help: consider removing the `*`: `x`
9
10 error[E0507]: cannot move out of `*x` which is behind a `*const` pointer
11   --> $DIR/borrowck-move-from-unsafe-ptr.rs:13:13
12    |
13 LL | unsafe fn foo(x: *const Box<isize>) -> Box<isize> {
14    |                  ----------------- help: consider changing this to be a mutable pointer: `*mut std::boxed::Box<isize>`
15 LL |     let y = *x; //~ ERROR cannot move out of dereference of raw pointer
16    |             ^^
17    |             |
18    |             cannot move out of `*x` which is behind a `*const` pointer
19    |             `x` is a `*const` pointer, so the data it refers to cannot be moved
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0507`.