]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/issue-73427.stderr
Rollup merge of #101292 - rust-lang:notriddle/rustdoc-table-first-child, r=GuillaumeGomez
[rust.git] / src / test / ui / resolve / issue-73427.stderr
1 error[E0423]: expected value, found enum `A`
2   --> $DIR/issue-73427.rs:33:5
3    |
4 LL |     A.foo();
5    |     ^
6    |
7 note: the enum is defined here
8   --> $DIR/issue-73427.rs:1:1
9    |
10 LL | / enum A {
11 LL | |     StructWithFields { x: () },
12 LL | |     TupleWithFields(()),
13 LL | |     Struct {},
14 LL | |     Tuple(),
15 LL | |     Unit,
16 LL | | }
17    | |_^
18 help: you might have meant to use one of the following enum variants
19    |
20 LL |     (A::Struct {}).foo();
21    |     ~~~~~~~~~~~~~~
22 LL |     (A::Tuple()).foo();
23    |     ~~~~~~~~~~~~
24 LL |     A::Unit.foo();
25    |     ~~~~~~~
26 help: alternatively, the following enum variants are also available
27    |
28 LL |     (A::StructWithFields { /* fields */ }).foo();
29    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 LL |     (A::TupleWithFields(/* fields */)).foo();
31    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32
33 error[E0423]: expected value, found enum `B`
34   --> $DIR/issue-73427.rs:35:5
35    |
36 LL |     B.foo();
37    |     ^
38    |
39 note: the enum is defined here
40   --> $DIR/issue-73427.rs:9:1
41    |
42 LL | / enum B {
43 LL | |     StructWithFields { x: () },
44 LL | |     TupleWithFields(()),
45 LL | | }
46    | |_^
47 help: the following enum variants are available
48    |
49 LL |     (B::StructWithFields { /* fields */ }).foo();
50    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51 LL |     (B::TupleWithFields(/* fields */)).foo();
52    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53
54 error[E0423]: expected value, found enum `C`
55   --> $DIR/issue-73427.rs:37:5
56    |
57 LL |     C.foo();
58    |     ^
59    |
60 note: the enum is defined here
61   --> $DIR/issue-73427.rs:14:1
62    |
63 LL | / enum C {
64 LL | |     StructWithFields { x: () },
65 LL | |     TupleWithFields(()),
66 LL | |     Unit,
67 LL | | }
68    | |_^
69 help: you might have meant to use the following enum variant
70    |
71 LL |     C::Unit.foo();
72    |     ~~~~~~~
73 help: alternatively, the following enum variants are also available
74    |
75 LL |     (C::StructWithFields { /* fields */ }).foo();
76    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77 LL |     (C::TupleWithFields(/* fields */)).foo();
78    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79
80 error[E0423]: expected value, found enum `D`
81   --> $DIR/issue-73427.rs:39:5
82    |
83 LL |     D.foo();
84    |     ^
85    |
86 note: the enum is defined here
87   --> $DIR/issue-73427.rs:20:1
88    |
89 LL | / enum D {
90 LL | |     TupleWithFields(()),
91 LL | |     Unit,
92 LL | | }
93    | |_^
94 help: you might have meant to use the following enum variant
95    |
96 LL |     D::Unit.foo();
97    |     ~~~~~~~
98 help: alternatively, the following enum variant is available
99    |
100 LL |     (D::TupleWithFields(/* fields */)).foo();
101    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102
103 error[E0423]: expected value, found enum `E`
104   --> $DIR/issue-73427.rs:41:5
105    |
106 LL |     E.foo();
107    |     ^
108    |
109 note: the enum is defined here
110   --> $DIR/issue-73427.rs:25:1
111    |
112 LL | / enum E {
113 LL | |     TupleWithFields(()),
114 LL | | }
115    | |_^
116 help: the following enum variant is available
117    |
118 LL |     (E::TupleWithFields(/* fields */)).foo();
119    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120 help: consider importing one of these items instead
121    |
122 LL | use std::f32::consts::E;
123    |
124 LL | use std::f64::consts::E;
125    |
126
127 error[E0423]: expected function, tuple struct or tuple variant, found enum `A`
128   --> $DIR/issue-73427.rs:46:13
129    |
130 LL |     let x = A(3);
131    |             ^
132    |
133    = help: you might have meant to construct one of the enum's non-tuple variants
134 note: the enum is defined here
135   --> $DIR/issue-73427.rs:1:1
136    |
137 LL | / enum A {
138 LL | |     StructWithFields { x: () },
139 LL | |     TupleWithFields(()),
140 LL | |     Struct {},
141 LL | |     Tuple(),
142 LL | |     Unit,
143 LL | | }
144    | |_^
145 help: try to construct one of the enum's variants
146    |
147 LL |     let x = A::Tuple(3);
148    |             ~~~~~~~~
149 LL |     let x = A::TupleWithFields(3);
150    |             ~~~~~~~~~~~~~~~~~~
151
152 error[E0532]: expected tuple struct or tuple variant, found enum `A`
153   --> $DIR/issue-73427.rs:48:12
154    |
155 LL |     if let A(3) = x { }
156    |            ^
157    |
158    = help: you might have meant to match against one of the enum's non-tuple variants
159 note: the enum is defined here
160   --> $DIR/issue-73427.rs:1:1
161    |
162 LL | / enum A {
163 LL | |     StructWithFields { x: () },
164 LL | |     TupleWithFields(()),
165 LL | |     Struct {},
166 LL | |     Tuple(),
167 LL | |     Unit,
168 LL | | }
169    | |_^
170 help: try to match against one of the enum's variants
171    |
172 LL |     if let A::Tuple(3) = x { }
173    |            ~~~~~~~~
174 LL |     if let A::TupleWithFields(3) = x { }
175    |            ~~~~~~~~~~~~~~~~~~
176
177 error: aborting due to 7 previous errors
178
179 Some errors have detailed explanations: E0423, E0532.
180 For more information about an error, try `rustc --explain E0423`.