diff --git a/src/test/ui/E0508-fail.ast.nll.stderr b/src/test/ui/E0508-fail.ast.nll.stderr new file mode 100644 index 000000000000..fda6c24dc871 --- /dev/null +++ b/src/test/ui/E0508-fail.ast.nll.stderr @@ -0,0 +1,12 @@ +error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array + --> $DIR/E0508-fail.rs:18:18 + | +LL | let _value = array[0]; //[ast]~ ERROR [E0508] + | ^^^^^^^^ + | | + | cannot move out of here + | help: consider borrowing here: `&array[0]` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/E0508.nll.stderr b/src/test/ui/E0508.nll.stderr new file mode 100644 index 000000000000..025ff874bced --- /dev/null +++ b/src/test/ui/E0508.nll.stderr @@ -0,0 +1,12 @@ +error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array + --> $DIR/E0508.rs:15:18 + | +LL | let _value = array[0]; //~ ERROR [E0508] + | ^^^^^^^^ + | | + | cannot move out of here + | help: consider borrowing here: `&array[0]` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.nll.stderr b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.nll.stderr new file mode 100644 index 000000000000..b9c47e6e8cfe --- /dev/null +++ b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.nll.stderr @@ -0,0 +1,12 @@ +error[E0507]: cannot move out of borrowed content + --> $DIR/borrowck-move-out-of-overloaded-deref.rs:14:14 + | +LL | let _x = *Rc::new("hi".to_string()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `Rc::new("hi".to_string())` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/error-codes/E0509.nll.stderr b/src/test/ui/error-codes/E0509.nll.stderr new file mode 100644 index 000000000000..723b083b9044 --- /dev/null +++ b/src/test/ui/error-codes/E0509.nll.stderr @@ -0,0 +1,12 @@ +error[E0509]: cannot move out of type `DropStruct`, which implements the `Drop` trait + --> $DIR/E0509.rs:26:23 + | +LL | let fancy_field = drop_struct.fancy; //~ ERROR E0509 + | ^^^^^^^^^^^^^^^^^ + | | + | cannot move out of here + | help: consider borrowing here: `&drop_struct.fancy` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/issues/issue-17718-static-move.nll.stderr b/src/test/ui/issues/issue-17718-static-move.nll.stderr new file mode 100644 index 000000000000..f8da3c3d5989 --- /dev/null +++ b/src/test/ui/issues/issue-17718-static-move.nll.stderr @@ -0,0 +1,12 @@ +error[E0507]: cannot move out of static item + --> $DIR/issue-17718-static-move.rs:16:14 + | +LL | let _a = FOO; //~ ERROR: cannot move out of static item + | ^^^ + | | + | cannot move out of static item + | help: consider borrowing here: `&FOO` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/std-uncopyable-atomics.nll.stderr b/src/test/ui/std-uncopyable-atomics.nll.stderr new file mode 100644 index 000000000000..e6b612fed858 --- /dev/null +++ b/src/test/ui/std-uncopyable-atomics.nll.stderr @@ -0,0 +1,39 @@ +error[E0507]: cannot move out of borrowed content + --> $DIR/std-uncopyable-atomics.rs:19:13 + | +LL | let x = *&x; //~ ERROR: cannot move out of borrowed content + | ^^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `&x` + +error[E0507]: cannot move out of borrowed content + --> $DIR/std-uncopyable-atomics.rs:21:13 + | +LL | let x = *&x; //~ ERROR: cannot move out of borrowed content + | ^^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `&x` + +error[E0507]: cannot move out of borrowed content + --> $DIR/std-uncopyable-atomics.rs:23:13 + | +LL | let x = *&x; //~ ERROR: cannot move out of borrowed content + | ^^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `&x` + +error[E0507]: cannot move out of borrowed content + --> $DIR/std-uncopyable-atomics.rs:25:13 + | +LL | let x = *&x; //~ ERROR: cannot move out of borrowed content + | ^^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `&x` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0507`.