]> git.proxmox.com Git - rustc.git/blame - src/test/ui/resolve/issue-73427.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / resolve / 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();
94222f64 21 | ~~~~~~~~~~~~~~
29967ef6 22LL | (A::Tuple()).foo();
94222f64 23 | ~~~~~~~~~~~~
29967ef6 24LL | A::Unit.foo();
94222f64 25 | ~~~~~~~
29967ef6
XL
26help: the following enum variants are available
27 |
28LL | (A::StructWithFields { /* fields */ }).foo();
94222f64 29 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29967ef6 30LL | (A::TupleWithFields(/* fields */)).foo();
94222f64 31 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29967ef6
XL
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();
94222f64 50 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29967ef6 51LL | (B::TupleWithFields(/* fields */)).foo();
94222f64 52 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29967ef6
XL
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();
94222f64 72 | ~~~~~~~
29967ef6
XL
73help: the following enum variants are available
74 |
75LL | (C::StructWithFields { /* fields */ }).foo();
94222f64 76 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29967ef6 77LL | (C::TupleWithFields(/* fields */)).foo();
94222f64 78 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29967ef6
XL
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();
94222f64 97 | ~~~~~~~
29967ef6
XL
98help: the following enum variant is available
99 |
100LL | (D::TupleWithFields(/* fields */)).foo();
94222f64 101 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29967ef6
XL
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 |
29967ef6 123LL | let x = A::Tuple(3);
94222f64 124 | ~~~~~~~~
3c0e092e
XL
125LL | let x = A::TupleWithFields(3);
126 | ~~~~~~~~~~~~~~~~~~
29967ef6
XL
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 |
29967ef6 148LL | if let A::Tuple(3) = x { }
94222f64 149 | ~~~~~~~~
3c0e092e
XL
150LL | if let A::TupleWithFields(3) = x { }
151 | ~~~~~~~~~~~~~~~~~~
29967ef6
XL
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`.