35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
error[E0423]: expected function, found enum `Option`
|
|
--> $DIR/issue-43871-enum-instead-of-variant.rs:14:13
|
|
|
|
|
LL | let x = Option(1); //~ ERROR expected function, found enum
|
|
| ^^^^^^
|
|
|
|
|
= note: did you mean to use one of the following variants?
|
|
- `std::prelude::v1::Option::None`
|
|
- `std::prelude::v1::Option::Some`
|
|
|
|
error[E0532]: expected tuple struct/variant, found enum `Option`
|
|
--> $DIR/issue-43871-enum-instead-of-variant.rs:16:12
|
|
|
|
|
LL | if let Option(_) = x { //~ ERROR expected tuple struct/variant, found enum
|
|
| ^^^^^^
|
|
|
|
|
= note: did you mean to use one of the following variants?
|
|
- `std::prelude::v1::Option::None`
|
|
- `std::prelude::v1::Option::Some`
|
|
|
|
error[E0532]: expected tuple struct/variant, found enum `Example`
|
|
--> $DIR/issue-43871-enum-instead-of-variant.rs:22:12
|
|
|
|
|
LL | if let Example(_) = y { //~ ERROR expected tuple struct/variant, found enum
|
|
| ^^^^^^^
|
|
|
|
|
= note: did you mean to use one of the following variants?
|
|
- `Example::Ex`
|
|
- `Example::NotEx`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
You've got a few errors: E0423, E0532
|
|
If you want more information on an error, try using "rustc --explain E0423"
|