fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0532]: expected tuple struct or tuple variant, found enum `Option` 2 --> $DIR/issue-43871-enum-instead-of-variant.rs:21:12 3 | 4LL | if let Option(_) = x { 5 | ^^^^^^ help: try to match against one of the enum's variants: `std::option::Option::Some` 6 | 7 = help: you might have meant to match against the enum's non-tuple variant 8 9error[E0532]: expected tuple struct or tuple variant, found enum `Example` 10 --> $DIR/issue-43871-enum-instead-of-variant.rs:27:12 11 | 12LL | if let Example(_) = y { 13 | ^^^^^^^ help: try to match against one of the enum's variants: `Example::Ex` 14 | 15 = help: you might have meant to match against the enum's non-tuple variant 16note: the enum is defined here 17 --> $DIR/issue-43871-enum-instead-of-variant.rs:1:1 18 | 19LL | enum Example { Ex(String), NotEx } 20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 21 22error[E0423]: expected function, tuple struct or tuple variant, found enum `Option` 23 --> $DIR/issue-43871-enum-instead-of-variant.rs:19:13 24 | 25LL | let x = Option(1); 26 | ^^^^^^ help: try to construct one of the enum's variants: `std::option::Option::Some` 27 | 28 = help: you might have meant to construct the enum's non-tuple variant 29 30error[E0423]: expected function, tuple struct or tuple variant, found enum `Void` 31 --> $DIR/issue-43871-enum-instead-of-variant.rs:31:13 32 | 33LL | let y = Void(); 34 | ^^^^ 35 | 36 = help: the enum has no tuple variants to construct 37note: the enum is defined here 38 --> $DIR/issue-43871-enum-instead-of-variant.rs:3:1 39 | 40LL | enum Void {} 41 | ^^^^^^^^^^^^ 42 43error[E0423]: expected function, tuple struct or tuple variant, found enum `ManyVariants` 44 --> $DIR/issue-43871-enum-instead-of-variant.rs:33:13 45 | 46LL | let z = ManyVariants(); 47 | ^^^^^^^^^^^^ 48 | 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 51note: the enum is defined here 52 --> $DIR/issue-43871-enum-instead-of-variant.rs:5:1 53 | 54LL | / enum ManyVariants { 55LL | | One, 56LL | | Two, 57LL | | Three, 58... | 59LL | | Ten, 60LL | | } 61 | |_^ 62 63error: aborting due to 5 previous errors 64 65Some errors have detailed explanations: E0423, E0532. 66For more information about an error, try `rustc --explain E0423`.