11error[E0423]: expected value, found enum `A`
2- --> $DIR/issue-73427.rs:29 :5
2+ --> $DIR/issue-73427.rs:33 :5
33 |
44LL | A.foo();
55 | ^
@@ -23,15 +23,15 @@ LL | (A::Tuple()).foo();
2323 | ~~~~~~~~~~~~
2424LL | A::Unit.foo();
2525 | ~~~~~~~
26- help: the following enum variants are available
26+ help: alternatively, the following enum variants are also available
2727 |
2828LL | (A::StructWithFields { /* fields */ }).foo();
2929 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3030LL | (A::TupleWithFields(/* fields */)).foo();
3131 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3232
3333error[E0423]: expected value, found enum `B`
34- --> $DIR/issue-73427.rs:31 :5
34+ --> $DIR/issue-73427.rs:35 :5
3535 |
3636LL | B.foo();
3737 | ^
@@ -52,7 +52,7 @@ LL | (B::TupleWithFields(/* fields */)).foo();
5252 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5353
5454error[E0423]: expected value, found enum `C`
55- --> $DIR/issue-73427.rs:33 :5
55+ --> $DIR/issue-73427.rs:37 :5
5656 |
5757LL | C.foo();
5858 | ^
@@ -70,15 +70,15 @@ help: you might have meant to use the following enum variant
7070 |
7171LL | C::Unit.foo();
7272 | ~~~~~~~
73- help: the following enum variants are available
73+ help: alternatively, the following enum variants are also available
7474 |
7575LL | (C::StructWithFields { /* fields */ }).foo();
7676 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7777LL | (C::TupleWithFields(/* fields */)).foo();
7878 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7979
8080error[E0423]: expected value, found enum `D`
81- --> $DIR/issue-73427.rs:35 :5
81+ --> $DIR/issue-73427.rs:39 :5
8282 |
8383LL | D.foo();
8484 | ^
@@ -95,13 +95,37 @@ help: you might have meant to use the following enum variant
9595 |
9696LL | D::Unit.foo();
9797 | ~~~~~~~
98- help: the following enum variant is available
98+ help: alternatively, the following enum variant is available
9999 |
100100LL | (D::TupleWithFields(/* fields */)).foo();
101101 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102102
103+ error[E0423]: expected value, found enum `E`
104+ --> $DIR/issue-73427.rs:41:5
105+ |
106+ LL | E.foo();
107+ | ^
108+ |
109+ note: the enum is defined here
110+ --> $DIR/issue-73427.rs:25:1
111+ |
112+ LL | / enum E {
113+ LL | | TupleWithFields(()),
114+ LL | | }
115+ | |_^
116+ help: the following enum variant is available
117+ |
118+ LL | (E::TupleWithFields(/* fields */)).foo();
119+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120+ help: consider importing one of these items instead
121+ |
122+ LL | use std::f32::consts::E;
123+ |
124+ LL | use std::f64::consts::E;
125+ |
126+
103127error[E0423]: expected function, tuple struct or tuple variant, found enum `A`
104- --> $DIR/issue-73427.rs:40 :13
128+ --> $DIR/issue-73427.rs:46 :13
105129 |
106130LL | let x = A(3);
107131 | ^
@@ -126,7 +150,7 @@ LL | let x = A::TupleWithFields(3);
126150 | ~~~~~~~~~~~~~~~~~~
127151
128152error[E0532]: expected tuple struct or tuple variant, found enum `A`
129- --> $DIR/issue-73427.rs:42 :12
153+ --> $DIR/issue-73427.rs:48 :12
130154 |
131155LL | if let A(3) = x { }
132156 | ^
@@ -150,7 +174,7 @@ LL | if let A::Tuple(3) = x { }
150174LL | if let A::TupleWithFields(3) = x { }
151175 | ~~~~~~~~~~~~~~~~~~
152176
153- error: aborting due to 6 previous errors
177+ error: aborting due to 7 previous errors
154178
155179Some errors have detailed explanations: E0423, E0532.
156180For more information about an error, try `rustc --explain E0423`.
0 commit comments