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