blob: 2140fd3a5a0370f31c598f638c00dadf69a8e7ec [file] [log] [blame]
error[E0423]: expected function, tuple struct or tuple variant, found enum `Option`
--> $DIR/issue-43871-enum-instead-of-variant.rs:19:13
|
LL | let x = Option(1);
| ^^^^^^
|
help: try using one of the enum's variants
|
LL | let x = std::option::Option::None(1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | let x = std::option::Option::Some(1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0532]: expected tuple struct or tuple variant, found enum `Option`
--> $DIR/issue-43871-enum-instead-of-variant.rs:21:12
|
LL | if let Option(_) = x {
| ^^^^^^
|
help: try using one of the enum's variants
|
LL | if let std::option::Option::None(_) = x {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | if let std::option::Option::Some(_) = x {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0532]: expected tuple struct or tuple variant, found enum `Example`
--> $DIR/issue-43871-enum-instead-of-variant.rs:27:12
|
LL | if let Example(_) = y {
| ^^^^^^^
|
help: try using one of the enum's variants
|
LL | if let Example::Ex(_) = y {
| ^^^^^^^^^^^
LL | if let Example::NotEx(_) = y {
| ^^^^^^^^^^^^^^
error[E0423]: expected function, tuple struct or tuple variant, found enum `Void`
--> $DIR/issue-43871-enum-instead-of-variant.rs:31:13
|
LL | let y = Void();
| ^^^^
error[E0423]: expected function, tuple struct or tuple variant, found enum `ManyVariants`
--> $DIR/issue-43871-enum-instead-of-variant.rs:33:13
|
LL | let z = ManyVariants();
| ^^^^^^^^^^^^
|
help: try using one of the enum's variants
|
LL | let z = ManyVariants::One();
| ^^^^^^^^^^^^^^^^^
LL | let z = ManyVariants::Two();
| ^^^^^^^^^^^^^^^^^
LL | let z = ManyVariants::Three();
| ^^^^^^^^^^^^^^^^^^^
LL | let z = ManyVariants::Four();
| ^^^^^^^^^^^^^^^^^^
and 6 other candidates
error: aborting due to 5 previous errors
Some errors have detailed explanations: E0423, E0532.
For more information about an error, try `rustc --explain E0423`.