diff options
author | David Tolnay <dtolnay@gmail.com> | 2019-05-11 12:19:48 -0700 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2019-05-11 12:20:18 -0700 |
commit | 9d4d2fade034e85465c6100360ae886f59826989 (patch) | |
tree | be406c0d3c6817e98c41dc3e73637ef0e564da52 | |
parent | c621f4476dd0b1a03ee7c25b14043ee983779f37 (diff) | |
download | remain-9d4d2fade034e85465c6100360ae886f59826989.tar.gz |
Move unnamed fields tests to new ui test
-rw-r--r-- | tests/ui/unnamed-fields.rs | 7 | ||||
-rw-r--r-- | tests/ui/unnamed-fields.stderr | 11 | ||||
-rw-r--r-- | tests/ui/unsupported.rs | 6 | ||||
-rw-r--r-- | tests/ui/unsupported.stderr | 12 |
4 files changed, 18 insertions, 18 deletions
diff --git a/tests/ui/unnamed-fields.rs b/tests/ui/unnamed-fields.rs new file mode 100644 index 0000000..2fcfda9 --- /dev/null +++ b/tests/ui/unnamed-fields.rs @@ -0,0 +1,7 @@ +#[remain::sorted] +struct TupleStruct(usize, usize, usize); + +#[remain::sorted] +struct UnitStruct; + +fn main() {} diff --git a/tests/ui/unnamed-fields.stderr b/tests/ui/unnamed-fields.stderr new file mode 100644 index 0000000..b7e28f5 --- /dev/null +++ b/tests/ui/unnamed-fields.stderr @@ -0,0 +1,11 @@ +error: expected enum, struct, or match expression + --> $DIR/unnamed-fields.rs:1:1 + | +1 | #[remain::sorted] + | ^^^^^^^^^^^^^^^^^ + +error: expected enum, struct, or match expression + --> $DIR/unnamed-fields.rs:4:1 + | +4 | #[remain::sorted] + | ^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/unsupported.rs b/tests/ui/unsupported.rs index dbda20c..b11c974 100644 --- a/tests/ui/unsupported.rs +++ b/tests/ui/unsupported.rs @@ -8,9 +8,3 @@ fn main() { _ => {} } } - -#[remain::sorted] -struct TestUnnamedStruct(usize, usize, usize, usize); - -#[remain::sorted] -struct TestUnitStruct; diff --git a/tests/ui/unsupported.stderr b/tests/ui/unsupported.stderr index 57f25a2..e471e1e 100644 --- a/tests/ui/unsupported.stderr +++ b/tests/ui/unsupported.stderr @@ -3,15 +3,3 @@ error: unsupported by #[remain::sorted] | 7 | 0..=20 => {} | ^^^^^^ - -error: expected enum, struct, or match expression - --> $DIR/unsupported.rs:12:1 - | -12 | #[remain::sorted] - | ^^^^^^^^^^^^^^^^^ - -error: expected enum, struct, or match expression - --> $DIR/unsupported.rs:15:1 - | -15 | #[remain::sorted] - | ^^^^^^^^^^^^^^^^^ |