summaryrefslogtreecommitdiffstats
path: root/src/test/ui/empty
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/empty')
-rw-r--r--src/test/ui/empty/empty-comment.stderr6
-rw-r--r--src/test/ui/empty/empty-struct-braces-expr.rs2
-rw-r--r--src/test/ui/empty/empty-struct-braces-expr.stderr32
-rw-r--r--src/test/ui/empty/empty-struct-braces-pat-1.stderr29
-rw-r--r--src/test/ui/empty/empty-struct-braces-pat-3.stderr58
5 files changed, 34 insertions, 93 deletions
diff --git a/src/test/ui/empty/empty-comment.stderr b/src/test/ui/empty/empty-comment.stderr
index f583dbbdc..7cc8d8fe9 100644
--- a/src/test/ui/empty/empty-comment.stderr
+++ b/src/test/ui/empty/empty-comment.stderr
@@ -6,6 +6,12 @@ LL | macro_rules! one_arg_macro {
...
LL | one_arg_macro!(/**/);
| ^^^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
+ |
+note: while trying to match meta-variable `$fmt:expr`
+ --> $DIR/empty-comment.rs:6:6
+ |
+LL | ($fmt:expr) => (print!(concat!($fmt, "\n")));
+ | ^^^^^^^^^
error: aborting due to previous error
diff --git a/src/test/ui/empty/empty-struct-braces-expr.rs b/src/test/ui/empty/empty-struct-braces-expr.rs
index f4144277f..2aab3e777 100644
--- a/src/test/ui/empty/empty-struct-braces-expr.rs
+++ b/src/test/ui/empty/empty-struct-braces-expr.rs
@@ -17,7 +17,7 @@ fn main() {
//~^ ERROR expected function, tuple struct or tuple variant, found struct `Empty1`
let e3 = E::Empty3; //~ ERROR expected value, found struct variant `E::Empty3`
let e3 = E::Empty3();
- //~^ ERROR expected function, tuple struct or tuple variant, found struct variant `E::Empty3`
+ //~^ ERROR expected value, found struct variant `E::Empty3`
let xe1 = XEmpty1; //~ ERROR expected value, found struct `XEmpty1`
let xe1 = XEmpty1();
diff --git a/src/test/ui/empty/empty-struct-braces-expr.stderr b/src/test/ui/empty/empty-struct-braces-expr.stderr
index 5b0ca613f..e1a7a02a5 100644
--- a/src/test/ui/empty/empty-struct-braces-expr.stderr
+++ b/src/test/ui/empty/empty-struct-braces-expr.stderr
@@ -21,24 +21,6 @@ help: a unit struct with a similar name exists
LL | let e1 = XEmpty2;
| ~~~~~~~
-error[E0423]: expected value, found struct variant `E::Empty3`
- --> $DIR/empty-struct-braces-expr.rs:18:14
- |
-LL | Empty3 {}
- | --------- `E::Empty3` defined here
-...
-LL | let e3 = E::Empty3;
- | ^^^^^^^^^ help: use struct literal syntax instead: `E::Empty3 {}`
-
-error[E0423]: expected function, tuple struct or tuple variant, found struct variant `E::Empty3`
- --> $DIR/empty-struct-braces-expr.rs:19:14
- |
-LL | Empty3 {}
- | --------- `E::Empty3` defined here
-...
-LL | let e3 = E::Empty3();
- | ^^^^^^^^^^^ help: use struct literal syntax instead: `E::Empty3 {}`
-
error[E0423]: expected value, found struct `XEmpty1`
--> $DIR/empty-struct-braces-expr.rs:22:15
|
@@ -84,6 +66,18 @@ help: a unit struct with a similar name exists
LL | let e1 = XEmpty2();
| ~~~~~~~
+error[E0533]: expected value, found struct variant `E::Empty3`
+ --> $DIR/empty-struct-braces-expr.rs:18:14
+ |
+LL | let e3 = E::Empty3;
+ | ^^^^^^^^^ not a value
+
+error[E0533]: expected value, found struct variant `E::Empty3`
+ --> $DIR/empty-struct-braces-expr.rs:19:14
+ |
+LL | let e3 = E::Empty3();
+ | ^^^^^^^^^ not a value
+
error[E0423]: expected function, tuple struct or tuple variant, found struct `XEmpty1`
--> $DIR/empty-struct-braces-expr.rs:23:15
|
@@ -132,5 +126,5 @@ LL | XE::Empty1 {};
error: aborting due to 9 previous errors
-Some errors have detailed explanations: E0423, E0599.
+Some errors have detailed explanations: E0423, E0533, E0599.
For more information about an error, try `rustc --explain E0423`.
diff --git a/src/test/ui/empty/empty-struct-braces-pat-1.stderr b/src/test/ui/empty/empty-struct-braces-pat-1.stderr
index 0215a9e59..14e09fc27 100644
--- a/src/test/ui/empty/empty-struct-braces-pat-1.stderr
+++ b/src/test/ui/empty/empty-struct-braces-pat-1.stderr
@@ -1,34 +1,15 @@
-error[E0532]: expected unit struct, unit variant or constant, found struct variant `E::Empty3`
+error[E0533]: expected unit struct, unit variant or constant, found struct variant `E::Empty3`
--> $DIR/empty-struct-braces-pat-1.rs:24:9
|
-LL | Empty3 {}
- | --------- `E::Empty3` defined here
-...
LL | E::Empty3 => ()
- | ^^^^^^^^^ help: use struct pattern syntax instead: `E::Empty3 {}`
+ | ^^^^^^^^^ not a unit struct, unit variant or constant
-error[E0532]: expected unit struct, unit variant or constant, found struct variant `XE::XEmpty3`
+error[E0533]: expected unit struct, unit variant or constant, found struct variant `XE::XEmpty3`
--> $DIR/empty-struct-braces-pat-1.rs:31:9
|
LL | XE::XEmpty3 => ()
- | ^^^^^^^^^^^
- |
- ::: $DIR/auxiliary/empty-struct.rs:6:5
- |
-LL | XEmpty3 {},
- | ------- `XE::XEmpty3` defined here
-LL | XEmpty4,
- | ------- similarly named unit variant `XEmpty4` defined here
- |
-help: use struct pattern syntax instead
- |
-LL | XE::XEmpty3 { /* fields */ } => ()
- | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-help: a unit variant with a similar name exists
- |
-LL | XE::XEmpty4 => ()
- | ~~~~~~~
+ | ^^^^^^^^^^^ not a unit struct, unit variant or constant
error: aborting due to 2 previous errors
-For more information about this error, try `rustc --explain E0532`.
+For more information about this error, try `rustc --explain E0533`.
diff --git a/src/test/ui/empty/empty-struct-braces-pat-3.stderr b/src/test/ui/empty/empty-struct-braces-pat-3.stderr
index 615e7fb4a..00c8b12e6 100644
--- a/src/test/ui/empty/empty-struct-braces-pat-3.stderr
+++ b/src/test/ui/empty/empty-struct-braces-pat-3.stderr
@@ -1,67 +1,27 @@
-error[E0532]: expected tuple struct or tuple variant, found struct variant `E::Empty3`
+error[E0164]: expected tuple struct or tuple variant, found struct variant `E::Empty3`
--> $DIR/empty-struct-braces-pat-3.rs:17:9
|
-LL | Empty3 {}
- | --------- `E::Empty3` defined here
-...
LL | E::Empty3() => ()
- | ^^^^^^^^^^^ help: use struct pattern syntax instead: `E::Empty3 {}`
+ | ^^^^^^^^^^^ not a tuple struct or tuple variant
-error[E0532]: expected tuple struct or tuple variant, found struct variant `XE::XEmpty3`
+error[E0164]: expected tuple struct or tuple variant, found struct variant `XE::XEmpty3`
--> $DIR/empty-struct-braces-pat-3.rs:21:9
|
LL | XE::XEmpty3() => ()
- | ^^^^^^^^^^^^^
- |
- ::: $DIR/auxiliary/empty-struct.rs:6:5
- |
-LL | XEmpty3 {},
- | ------- `XE::XEmpty3` defined here
-LL | XEmpty4,
-LL | XEmpty5(),
- | ------- similarly named tuple variant `XEmpty5` defined here
- |
-help: use struct pattern syntax instead
- |
-LL | XE::XEmpty3 { /* fields */ } => ()
- | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-help: a tuple variant with a similar name exists
- |
-LL | XE::XEmpty5() => ()
- | ~~~~~~~
+ | ^^^^^^^^^^^^^ not a tuple struct or tuple variant
-error[E0532]: expected tuple struct or tuple variant, found struct variant `E::Empty3`
+error[E0164]: expected tuple struct or tuple variant, found struct variant `E::Empty3`
--> $DIR/empty-struct-braces-pat-3.rs:25:9
|
-LL | Empty3 {}
- | --------- `E::Empty3` defined here
-...
LL | E::Empty3(..) => ()
- | ^^^^^^^^^^^^^ help: use struct pattern syntax instead: `E::Empty3 {}`
+ | ^^^^^^^^^^^^^ not a tuple struct or tuple variant
-error[E0532]: expected tuple struct or tuple variant, found struct variant `XE::XEmpty3`
+error[E0164]: expected tuple struct or tuple variant, found struct variant `XE::XEmpty3`
--> $DIR/empty-struct-braces-pat-3.rs:29:9
|
LL | XE::XEmpty3(..) => ()
- | ^^^^^^^^^^^^^^^
- |
- ::: $DIR/auxiliary/empty-struct.rs:6:5
- |
-LL | XEmpty3 {},
- | ------- `XE::XEmpty3` defined here
-LL | XEmpty4,
-LL | XEmpty5(),
- | ------- similarly named tuple variant `XEmpty5` defined here
- |
-help: use struct pattern syntax instead
- |
-LL | XE::XEmpty3 { /* fields */ } => ()
- | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-help: a tuple variant with a similar name exists
- |
-LL | XE::XEmpty5(..) => ()
- | ~~~~~~~
+ | ^^^^^^^^^^^^^^^ not a tuple struct or tuple variant
error: aborting due to 4 previous errors
-For more information about this error, try `rustc --explain E0532`.
+For more information about this error, try `rustc --explain E0164`.