summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve/issue-73427.stderr
blob: 622de9b39bde78da6244f5951ea00489f048f351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
error[E0423]: expected value, found enum `A`
  --> $DIR/issue-73427.rs:33:5
   |
LL |     A.foo();
   |     ^
   |
note: the enum is defined here
  --> $DIR/issue-73427.rs:1:1
   |
LL | / enum A {
LL | |     StructWithFields { x: () },
LL | |     TupleWithFields(()),
LL | |     Struct {},
LL | |     Tuple(),
LL | |     Unit,
LL | | }
   | |_^
help: you might have meant to use one of the following enum variants
   |
LL |     (A::Tuple()).foo();
   |     ~~~~~~~~~~~~
LL |     A::Unit.foo();
   |     ~~~~~~~
help: alternatively, the following enum variant is available
   |
LL |     (A::TupleWithFields(/* fields */)).foo();
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0423]: expected value, found enum `B`
  --> $DIR/issue-73427.rs:35:5
   |
LL |     B.foo();
   |     ^ help: the following enum variant is available: `(B::TupleWithFields(/* fields */))`
   |
note: the enum is defined here
  --> $DIR/issue-73427.rs:9:1
   |
LL | / enum B {
LL | |     StructWithFields { x: () },
LL | |     TupleWithFields(()),
LL | | }
   | |_^

error[E0423]: expected value, found enum `C`
  --> $DIR/issue-73427.rs:37:5
   |
LL |     C.foo();
   |     ^
   |
note: the enum is defined here
  --> $DIR/issue-73427.rs:14:1
   |
LL | / enum C {
LL | |     StructWithFields { x: () },
LL | |     TupleWithFields(()),
LL | |     Unit,
LL | | }
   | |_^
help: you might have meant to use the following enum variant
   |
LL |     C::Unit.foo();
   |     ~~~~~~~
help: alternatively, the following enum variant is available
   |
LL |     (C::TupleWithFields(/* fields */)).foo();
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0423]: expected value, found enum `D`
  --> $DIR/issue-73427.rs:39:5
   |
LL |     D.foo();
   |     ^
   |
note: the enum is defined here
  --> $DIR/issue-73427.rs:20:1
   |
LL | / enum D {
LL | |     TupleWithFields(()),
LL | |     Unit,
LL | | }
   | |_^
help: you might have meant to use the following enum variant
   |
LL |     D::Unit.foo();
   |     ~~~~~~~
help: alternatively, the following enum variant is available
   |
LL |     (D::TupleWithFields(/* fields */)).foo();
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0423]: expected value, found enum `E`
  --> $DIR/issue-73427.rs:41:5
   |
LL |     E.foo();
   |     ^
   |
note: the enum is defined here
  --> $DIR/issue-73427.rs:25:1
   |
LL | / enum E {
LL | |     TupleWithFields(()),
LL | | }
   | |_^
help: the following enum variant is available
   |
LL |     (E::TupleWithFields(/* fields */)).foo();
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: consider importing one of these items instead
   |
LL + use std::f32::consts::E;
   |
LL + use std::f64::consts::E;
   |

error[E0532]: expected tuple struct or tuple variant, found enum `A`
  --> $DIR/issue-73427.rs:48:12
   |
LL |     if let A(3) = x { }
   |            ^
   |
   = help: you might have meant to match against the enum's non-tuple variant
note: the enum is defined here
  --> $DIR/issue-73427.rs:1:1
   |
LL | / enum A {
LL | |     StructWithFields { x: () },
LL | |     TupleWithFields(()),
LL | |     Struct {},
LL | |     Tuple(),
LL | |     Unit,
LL | | }
   | |_^
help: try to match against one of the enum's variants
   |
LL |     if let A::Tuple(3) = x { }
   |            ~~~~~~~~
LL |     if let A::TupleWithFields(3) = x { }
   |            ~~~~~~~~~~~~~~~~~~

error[E0423]: expected function, tuple struct or tuple variant, found enum `A`
  --> $DIR/issue-73427.rs:46:13
   |
LL |     let x = A(3);
   |             ^
   |
   = help: you might have meant to construct the enum's non-tuple variant
note: the enum is defined here
  --> $DIR/issue-73427.rs:1:1
   |
LL | / enum A {
LL | |     StructWithFields { x: () },
LL | |     TupleWithFields(()),
LL | |     Struct {},
LL | |     Tuple(),
LL | |     Unit,
LL | | }
   | |_^
help: try to construct one of the enum's variants
   |
LL |     let x = A::Tuple(3);
   |             ~~~~~~~~
LL |     let x = A::TupleWithFields(3);
   |             ~~~~~~~~~~~~~~~~~~

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0423, E0532.
For more information about an error, try `rustc --explain E0423`.