1 error[E0532]: expected tuple struct or tuple variant, found enum `Option`
2 --> $DIR/issue-43871-enum-instead-of-variant.rs:21:12
4 LL | if let Option(_) = x {
5 | ^^^^^^ help: try to match against one of the enum's variants: `std::option::Option::Some`
7 = help: you might have meant to match against the enum's non-tuple variant
9 error[E0532]: expected tuple struct or tuple variant, found enum `Example`
10 --> $DIR/issue-43871-enum-instead-of-variant.rs:27:12
12 LL | if let Example(_) = y {
13 | ^^^^^^^ help: try to match against one of the enum's variants: `Example::Ex`
15 = help: you might have meant to match against the enum's non-tuple variant
16 note: the enum is defined here
17 --> $DIR/issue-43871-enum-instead-of-variant.rs:1:1
19 LL | enum Example { Ex(String), NotEx }
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 error[E0423]: expected function, tuple struct or tuple variant, found enum `Option`
23 --> $DIR/issue-43871-enum-instead-of-variant.rs:19:13
25 LL | let x = Option(1);
26 | ^^^^^^ help: try to construct one of the enum's variants: `std::option::Option::Some`
28 = help: you might have meant to construct the enum's non-tuple variant
30 error[E0423]: expected function, tuple struct or tuple variant, found enum `Void`
31 --> $DIR/issue-43871-enum-instead-of-variant.rs:31:13
36 = help: the enum has no tuple variants to construct
37 note: the enum is defined here
38 --> $DIR/issue-43871-enum-instead-of-variant.rs:3:1
43 error[E0423]: expected function, tuple struct or tuple variant, found enum `ManyVariants`
44 --> $DIR/issue-43871-enum-instead-of-variant.rs:33:13
46 LL | let z = ManyVariants();
49 = help: the enum has no tuple variants to construct
50 = help: you might have meant to construct one of the enum's non-tuple variants
51 note: the enum is defined here
52 --> $DIR/issue-43871-enum-instead-of-variant.rs:5:1
54 LL | / enum ManyVariants {
63 error: aborting due to 5 previous errors
65 Some errors have detailed explanations: E0423, E0532.
66 For more information about an error, try `rustc --explain E0423`.