2017-11-15 09:20:09 +02:00
|
|
|
error[E0423]: expected function, found enum `Option`
|
2019-03-20 14:54:43 -04:00
|
|
|
--> $DIR/issue-43871-enum-instead-of-variant.rs:19:13
|
2017-11-23 15:10:23 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let x = Option(1);
|
2017-11-23 15:10:23 +02:00
|
|
|
| ^^^^^^
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-20 14:54:43 -04:00
|
|
|
help: try using one of the enum's variants
|
2017-11-15 09:20:09 +02:00
|
|
|
|
|
2019-10-05 16:02:34 -04:00
|
|
|
LL | let x = std::option::Option::None(1);
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
LL | let x = std::option::Option::Some(1);
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-11-15 09:20:09 +02:00
|
|
|
|
|
|
|
|
error[E0532]: expected tuple struct/variant, found enum `Option`
|
2019-03-20 14:54:43 -04:00
|
|
|
--> $DIR/issue-43871-enum-instead-of-variant.rs:21:12
|
2017-11-15 09:20:09 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | if let Option(_) = x {
|
2017-11-15 09:20:09 +02:00
|
|
|
| ^^^^^^
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-20 14:54:43 -04:00
|
|
|
help: try using one of the enum's variants
|
2017-11-15 09:20:09 +02:00
|
|
|
|
|
2019-10-05 16:02:34 -04:00
|
|
|
LL | if let std::option::Option::None(_) = x {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
LL | if let std::option::Option::Some(_) = x {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-11-15 09:20:09 +02:00
|
|
|
|
2017-11-23 15:10:23 +02:00
|
|
|
error[E0532]: expected tuple struct/variant, found enum `Example`
|
2019-03-20 14:54:43 -04:00
|
|
|
--> $DIR/issue-43871-enum-instead-of-variant.rs:27:12
|
2017-11-23 15:10:23 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | if let Example(_) = y {
|
2017-11-23 15:10:23 +02:00
|
|
|
| ^^^^^^^
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-20 14:54:43 -04:00
|
|
|
help: try using one of the enum's variants
|
2017-11-23 15:10:23 +02:00
|
|
|
|
|
2019-03-20 14:54:43 -04:00
|
|
|
LL | if let Example::Ex(_) = y {
|
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
LL | if let Example::NotEx(_) = y {
|
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-23 15:10:23 +02:00
|
|
|
|
2019-03-20 14:54:43 -04:00
|
|
|
error[E0423]: expected function, found enum `Void`
|
|
|
|
|
--> $DIR/issue-43871-enum-instead-of-variant.rs:31:13
|
|
|
|
|
|
|
|
|
|
|
LL | let y = Void();
|
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
|
error[E0423]: expected function, found enum `ManyVariants`
|
|
|
|
|
--> $DIR/issue-43871-enum-instead-of-variant.rs:33:13
|
|
|
|
|
|
|
|
|
|
|
LL | let z = ManyVariants();
|
|
|
|
|
| ^^^^^^^^^^^^
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-20 14:54:43 -04:00
|
|
|
help: try using one of the enum's variants
|
|
|
|
|
|
|
2019-10-05 16:02:34 -04:00
|
|
|
LL | let z = ManyVariants::One();
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
LL | let z = ManyVariants::Two();
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
LL | let z = ManyVariants::Three();
|
2019-03-20 14:54:43 -04:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
LL | let z = ManyVariants::Four();
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
2019-10-13 21:48:39 -07:00
|
|
|
and 6 other candidates
|
2019-03-20 14:54:43 -04:00
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2017-11-15 09:20:09 +02:00
|
|
|
|
2019-04-17 13:26:38 -04:00
|
|
|
Some errors have detailed explanations: E0423, E0532.
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about an error, try `rustc --explain E0423`.
|