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