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