|
1 | 1 | error[E0423]: expected function, found enum `Option`
|
2 |
| - --> $DIR/issue-43871-enum-instead-of-variant.rs:4:13 |
| 2 | + --> $DIR/issue-43871-enum-instead-of-variant.rs:19:13 |
3 | 3 | |
|
4 | 4 | LL | let x = Option(1);
|
5 | 5 | | ^^^^^^
|
| 6 | +help: try using one of the enum's variants |
6 | 7 | |
|
7 |
| - = note: did you mean to use one of the following variants? |
8 |
| - - `std::prelude::v1::Option::None` |
9 |
| - - `std::prelude::v1::Option::Some` |
| 8 | +LL | let x = std::prelude::v1::Option::None(1); |
| 9 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 10 | +LL | let x = std::prelude::v1::Option::Some(1); |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
10 | 12 |
|
11 | 13 | error[E0532]: expected tuple struct/variant, found enum `Option`
|
12 |
| - --> $DIR/issue-43871-enum-instead-of-variant.rs:6:12 |
| 14 | + --> $DIR/issue-43871-enum-instead-of-variant.rs:21:12 |
13 | 15 | |
|
14 | 16 | LL | if let Option(_) = x {
|
15 | 17 | | ^^^^^^
|
| 18 | +help: try using one of the enum's variants |
16 | 19 | |
|
17 |
| - = note: did you mean to use one of the following variants? |
18 |
| - - `std::prelude::v1::Option::None` |
19 |
| - - `std::prelude::v1::Option::Some` |
| 20 | +LL | if let std::prelude::v1::Option::None(_) = x { |
| 21 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 22 | +LL | if let std::prelude::v1::Option::Some(_) = x { |
| 23 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
20 | 24 |
|
21 | 25 | error[E0532]: expected tuple struct/variant, found enum `Example`
|
22 |
| - --> $DIR/issue-43871-enum-instead-of-variant.rs:12:12 |
| 26 | + --> $DIR/issue-43871-enum-instead-of-variant.rs:27:12 |
23 | 27 | |
|
24 | 28 | LL | if let Example(_) = y {
|
25 | 29 | | ^^^^^^^
|
| 30 | +help: try using one of the enum's variants |
26 | 31 | |
|
27 |
| - = note: did you mean to use one of the following variants? |
28 |
| - - `Example::Ex` |
29 |
| - - `Example::NotEx` |
| 32 | +LL | if let Example::Ex(_) = y { |
| 33 | + | ^^^^^^^^^^^ |
| 34 | +LL | if let Example::NotEx(_) = y { |
| 35 | + | ^^^^^^^^^^^^^^ |
30 | 36 |
|
31 |
| -error: aborting due to 3 previous errors |
| 37 | +error[E0423]: expected function, found enum `Void` |
| 38 | + --> $DIR/issue-43871-enum-instead-of-variant.rs:31:13 |
| 39 | + | |
| 40 | +LL | let y = Void(); |
| 41 | + | ^^^^ |
| 42 | + |
| 43 | +error[E0423]: expected function, found enum `ManyVariants` |
| 44 | + --> $DIR/issue-43871-enum-instead-of-variant.rs:33:13 |
| 45 | + | |
| 46 | +LL | let z = ManyVariants(); |
| 47 | + | ^^^^^^^^^^^^ |
| 48 | +help: try using one of the enum's variants |
| 49 | + | |
| 50 | +LL | let z = ManyVariants::Eight(); |
| 51 | + | ^^^^^^^^^^^^^^^^^^^ |
| 52 | +LL | let z = ManyVariants::Five(); |
| 53 | + | ^^^^^^^^^^^^^^^^^^ |
| 54 | +LL | let z = ManyVariants::Four(); |
| 55 | + | ^^^^^^^^^^^^^^^^^^ |
| 56 | +LL | let z = ManyVariants::Nine(); |
| 57 | + | ^^^^^^^^^^^^^^^^^^ |
| 58 | +and 6 other candidates |
| 59 | + |
| 60 | +error: aborting due to 5 previous errors |
32 | 61 |
|
33 | 62 | Some errors occurred: E0423, E0532.
|
34 | 63 | For more information about an error, try `rustc --explain E0423`.
|
0 commit comments