]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-struct-braces-expr.stderr
improve unknown enum variant errors
[rust.git] / src / test / ui / empty / empty-struct-braces-expr.stderr
1 error[E0423]: expected value, found struct `Empty1`
2   --> $DIR/empty-struct-braces-expr.rs:15:14
3    |
4 LL |     let e1 = Empty1;
5    |              ^^^^^^
6    |              |
7    |              did you mean `Empty1 { /* fields */ }`?
8    |              help: a unit struct with a similar name exists: `XEmpty2`
9
10 error[E0423]: expected function, found struct `Empty1`
11   --> $DIR/empty-struct-braces-expr.rs:16:14
12    |
13 LL |     let e1 = Empty1();
14    |              ^^^^^^
15    |              |
16    |              did you mean `Empty1 { /* fields */ }`?
17    |              help: a unit struct with a similar name exists: `XEmpty2`
18
19 error[E0423]: expected value, found struct variant `E::Empty3`
20   --> $DIR/empty-struct-braces-expr.rs:17:14
21    |
22 LL |     let e3 = E::Empty3;
23    |              ^^^^^^^^^ did you mean `E::Empty3 { /* fields */ }`?
24
25 error[E0423]: expected function, found struct variant `E::Empty3`
26   --> $DIR/empty-struct-braces-expr.rs:18:14
27    |
28 LL |     let e3 = E::Empty3();
29    |              ^^^^^^^^^ did you mean `E::Empty3 { /* fields */ }`?
30
31 error[E0423]: expected value, found struct `XEmpty1`
32   --> $DIR/empty-struct-braces-expr.rs:20:15
33    |
34 LL |     let xe1 = XEmpty1;
35    |               ^^^^^^^
36    |               |
37    |               did you mean `XEmpty1 { /* fields */ }`?
38    |               help: a unit struct with a similar name exists: `XEmpty2`
39
40 error[E0423]: expected function, found struct `XEmpty1`
41   --> $DIR/empty-struct-braces-expr.rs:21:15
42    |
43 LL |     let xe1 = XEmpty1();
44    |               ^^^^^^^
45    |               |
46    |               did you mean `XEmpty1 { /* fields */ }`?
47    |               help: a unit struct with a similar name exists: `XEmpty2`
48
49 error[E0599]: no variant or associated item named `Empty3` found for type `empty_struct::XE` in the current scope
50   --> $DIR/empty-struct-braces-expr.rs:22:19
51    |
52 LL |     let xe3 = XE::Empty3;
53    |                   ^^^^^^
54    |                   |
55    |                   variant or associated item not found in `empty_struct::XE`
56    |                   help: there is a variant with a similar name: `XEmpty3`
57
58 error[E0599]: no variant or associated item named `Empty3` found for type `empty_struct::XE` in the current scope
59   --> $DIR/empty-struct-braces-expr.rs:23:19
60    |
61 LL |     let xe3 = XE::Empty3();
62    |                   ^^^^^^
63    |                   |
64    |                   variant or associated item not found in `empty_struct::XE`
65    |                   help: there is a variant with a similar name: `XEmpty3`
66
67 error: no variant `Empty1` in enum `empty_struct::XE`
68   --> $DIR/empty-struct-braces-expr.rs:25:9
69    |
70 LL |     XE::Empty1 {};
71    |         ^^^^^^ help: there is a variant with a similar name: `XEmpty3`
72
73 error: aborting due to 9 previous errors
74
75 Some errors occurred: E0423, E0599.
76 For more information about an error, try `rustc --explain E0423`.