diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2018-08-21 20:47:39 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2018-08-22 21:36:10 +0100 |
| commit | cd92da833fcb8818ac679be615c7bfe02edaa235 (patch) | |
| tree | 394f50369669076ea114e2fe156bf1f6c02679c7 /src/test/ui/error-codes | |
| parent | b83fe42237d5c3e3e40708f9ce8c8fa1eec3e431 (diff) | |
| download | rust-cd92da833fcb8818ac679be615c7bfe02edaa235.tar.gz rust-cd92da833fcb8818ac679be615c7bfe02edaa235.zip | |
Update E0161 test to cover more cases
Update another test that broke due to E0161 no longer being buffered
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0161.ast.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0161.astul.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0161.edition.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0161.editionul.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0161.nll.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0161.nllul.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0161.rs | 25 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0161.zflags.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0161.zflagsul.stderr | 9 |
9 files changed, 94 insertions, 3 deletions
diff --git a/src/test/ui/error-codes/E0161.ast.stderr b/src/test/ui/error-codes/E0161.ast.stderr new file mode 100644 index 00000000000..62e8676e631 --- /dev/null +++ b/src/test/ui/error-codes/E0161.ast.stderr @@ -0,0 +1,9 @@ +error[E0161]: cannot move a value of type [i32]: the size of [i32] cannot be statically determined + --> $DIR/E0161.rs:32:9 + | +LL | box *x; //~ ERROR E0161 + | ^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0161`. diff --git a/src/test/ui/error-codes/E0161.astul.stderr b/src/test/ui/error-codes/E0161.astul.stderr new file mode 100644 index 00000000000..79080fb4eae --- /dev/null +++ b/src/test/ui/error-codes/E0161.astul.stderr @@ -0,0 +1,9 @@ +error[E0161]: cannot move a value of type [i32]: the size of [i32] cannot be statically determined + --> $DIR/E0161.rs:32:5 + | +LL | box *x; //~ ERROR E0161 + | ^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0161`. diff --git a/src/test/ui/error-codes/E0161.edition.stderr b/src/test/ui/error-codes/E0161.edition.stderr new file mode 100644 index 00000000000..62e8676e631 --- /dev/null +++ b/src/test/ui/error-codes/E0161.edition.stderr @@ -0,0 +1,9 @@ +error[E0161]: cannot move a value of type [i32]: the size of [i32] cannot be statically determined + --> $DIR/E0161.rs:32:9 + | +LL | box *x; //~ ERROR E0161 + | ^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0161`. diff --git a/src/test/ui/error-codes/E0161.editionul.stderr b/src/test/ui/error-codes/E0161.editionul.stderr new file mode 100644 index 00000000000..79080fb4eae --- /dev/null +++ b/src/test/ui/error-codes/E0161.editionul.stderr @@ -0,0 +1,9 @@ +error[E0161]: cannot move a value of type [i32]: the size of [i32] cannot be statically determined + --> $DIR/E0161.rs:32:5 + | +LL | box *x; //~ ERROR E0161 + | ^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0161`. diff --git a/src/test/ui/error-codes/E0161.nll.stderr b/src/test/ui/error-codes/E0161.nll.stderr new file mode 100644 index 00000000000..62e8676e631 --- /dev/null +++ b/src/test/ui/error-codes/E0161.nll.stderr @@ -0,0 +1,9 @@ +error[E0161]: cannot move a value of type [i32]: the size of [i32] cannot be statically determined + --> $DIR/E0161.rs:32:9 + | +LL | box *x; //~ ERROR E0161 + | ^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0161`. diff --git a/src/test/ui/error-codes/E0161.nllul.stderr b/src/test/ui/error-codes/E0161.nllul.stderr new file mode 100644 index 00000000000..79080fb4eae --- /dev/null +++ b/src/test/ui/error-codes/E0161.nllul.stderr @@ -0,0 +1,9 @@ +error[E0161]: cannot move a value of type [i32]: the size of [i32] cannot be statically determined + --> $DIR/E0161.rs:32:5 + | +LL | box *x; //~ ERROR E0161 + | ^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0161`. diff --git a/src/test/ui/error-codes/E0161.rs b/src/test/ui/error-codes/E0161.rs index 81adf908302..edc5a84a843 100644 --- a/src/test/ui/error-codes/E0161.rs +++ b/src/test/ui/error-codes/E0161.rs @@ -8,9 +8,28 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-compare-mode-nll + +// Check that E0161 is a hard error in all possible configurations that might +// affect it. + +// revisions: ast nll zflags edition astul nllul zflagsul editionul +//[zflags]compile-flags: -Z borrowck=migrate -Z two-phase-borrows +//[edition]edition:2018 +//[zflagsul]compile-flags: -Z borrowck=migrate -Z two-phase-borrows +//[editionul]edition:2018 + +#![cfg_attr(nll, feature(nll))] +#![cfg_attr(nllul, feature(nll))] +#![cfg_attr(astul, feature(unsized_locals))] +#![cfg_attr(zflagsul, feature(unsized_locals))] +#![cfg_attr(nllul, feature(unsized_locals))] +#![cfg_attr(editionul, feature(unsized_locals))] + #![feature(box_syntax)] -fn main() { - let _x: Box<str> = box *"hello"; //~ ERROR E0161 - //~^ ERROR E0507 +fn foo(x: Box<[i32]>) { + box *x; //~ ERROR E0161 } + +fn main() {} diff --git a/src/test/ui/error-codes/E0161.zflags.stderr b/src/test/ui/error-codes/E0161.zflags.stderr new file mode 100644 index 00000000000..62e8676e631 --- /dev/null +++ b/src/test/ui/error-codes/E0161.zflags.stderr @@ -0,0 +1,9 @@ +error[E0161]: cannot move a value of type [i32]: the size of [i32] cannot be statically determined + --> $DIR/E0161.rs:32:9 + | +LL | box *x; //~ ERROR E0161 + | ^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0161`. diff --git a/src/test/ui/error-codes/E0161.zflagsul.stderr b/src/test/ui/error-codes/E0161.zflagsul.stderr new file mode 100644 index 00000000000..79080fb4eae --- /dev/null +++ b/src/test/ui/error-codes/E0161.zflagsul.stderr @@ -0,0 +1,9 @@ +error[E0161]: cannot move a value of type [i32]: the size of [i32] cannot be statically determined + --> $DIR/E0161.rs:32:5 + | +LL | box *x; //~ ERROR E0161 + | ^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0161`. |
