diff options
Diffstat (limited to 'src/test/ui/empty/empty-struct-braces-expr.stderr')
| -rw-r--r-- | src/test/ui/empty/empty-struct-braces-expr.stderr | 60 |
1 files changed, 37 insertions, 23 deletions
diff --git a/src/test/ui/empty/empty-struct-braces-expr.stderr b/src/test/ui/empty/empty-struct-braces-expr.stderr index 9da3a5f5bdb..c0ba9716fb0 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.stderr +++ b/src/test/ui/empty/empty-struct-braces-expr.stderr @@ -6,14 +6,20 @@ LL | struct Empty1 {} ... LL | let e1 = Empty1; | ^^^^^^ - | | - | did you mean `Empty1 { /* fields */ }`? - | help: a unit struct with a similar name exists: `XEmpty2` | ::: $DIR/auxiliary/empty-struct.rs:2:1 | LL | pub struct XEmpty2; | ------------------- similarly named unit struct `XEmpty2` defined here + | +help: a unit struct with a similar name exists + | +LL | let e1 = XEmpty2; + | ^^^^^^^ +help: use struct literal syntax instead + | +LL | let e1 = Empty1 {}; + | ^^^^^^^^^ error[E0423]: expected function, tuple struct or tuple variant, found struct `Empty1` --> $DIR/empty-struct-braces-expr.rs:16:14 @@ -22,15 +28,16 @@ LL | struct Empty1 {} | ---------------- `Empty1` defined here ... LL | let e1 = Empty1(); - | ^^^^^^ - | | - | did you mean `Empty1 { /* fields */ }`? - | help: a unit struct with a similar name exists: `XEmpty2` - | - ::: $DIR/auxiliary/empty-struct.rs:2:1 + | ^^^^^^^^ | -LL | pub struct XEmpty2; - | ------------------- similarly named unit struct `XEmpty2` defined here +help: a unit struct with a similar name exists + | +LL | let e1 = XEmpty2(); + | ^^^^^^^ +help: use struct literal syntax instead + | +LL | let e1 = Empty1 {}; + | ^^^^^^^^^ error[E0423]: expected value, found struct variant `E::Empty3` --> $DIR/empty-struct-braces-expr.rs:18:14 @@ -39,7 +46,7 @@ LL | Empty3 {} | --------- `E::Empty3` defined here ... LL | let e3 = E::Empty3; - | ^^^^^^^^^ did you mean `E::Empty3 { /* fields */ }`? + | ^^^^^^^^^ 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 @@ -48,35 +55,42 @@ LL | Empty3 {} | --------- `E::Empty3` defined here ... LL | let e3 = E::Empty3(); - | ^^^^^^^^^ did you mean `E::Empty3 { /* fields */ }`? + | ^^^^^^^^^^^ help: use struct literal syntax instead: `E::Empty3 {}` error[E0423]: expected value, found struct `XEmpty1` --> $DIR/empty-struct-braces-expr.rs:22:15 | LL | let xe1 = XEmpty1; | ^^^^^^^ - | | - | did you mean `XEmpty1 { /* fields */ }`? - | help: a unit struct with a similar name exists: `XEmpty2` | ::: $DIR/auxiliary/empty-struct.rs:2:1 | LL | pub struct XEmpty2; | ------------------- similarly named unit struct `XEmpty2` defined here + | +help: a unit struct with a similar name exists + | +LL | let xe1 = XEmpty2; + | ^^^^^^^ +help: use struct literal syntax instead + | +LL | let xe1 = XEmpty1 {}; + | ^^^^^^^^^^ error[E0423]: expected function, tuple struct or tuple variant, found struct `XEmpty1` --> $DIR/empty-struct-braces-expr.rs:23:15 | LL | let xe1 = XEmpty1(); + | ^^^^^^^^^ + | +help: a unit struct with a similar name exists + | +LL | let xe1 = XEmpty2(); | ^^^^^^^ - | | - | did you mean `XEmpty1 { /* fields */ }`? - | help: a unit struct with a similar name exists: `XEmpty2` - | - ::: $DIR/auxiliary/empty-struct.rs:2:1 +help: use struct literal syntax instead | -LL | pub struct XEmpty2; - | ------------------- similarly named unit struct `XEmpty2` defined here +LL | let xe1 = XEmpty1 {}; + | ^^^^^^^^^^ error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:25:19 |
