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