error[E0533]: expected value, found struct variant `Enum::Struct` --> $DIR/incorrect-variant-literal.rs:13:5 | LL | Enum::Struct; | ^^^^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL | Enum::Struct { x: /* value */ }; | ++++++++++++++++++ error[E0618]: expected function, found enum variant `Enum::Unit` --> $DIR/incorrect-variant-literal.rs:14:5 | LL | Unit, | ---- enum variant `Enum::Unit` defined here ... LL | Enum::Unit(); | ^^^^^^^^^^-- | | | call expression requires function | help: `Enum::Unit` is a unit enum variant, and does not take parentheses to be constructed | LL - Enum::Unit(); LL + Enum::Unit; | error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied --> $DIR/incorrect-variant-literal.rs:15:5 | LL | Enum::Tuple(); | ^^^^^^^^^^^-- argument #1 of type `i32` is missing | note: tuple variant defined here --> $DIR/incorrect-variant-literal.rs:6:5 | LL | Tuple(i32), | ^^^^^ help: provide the argument | LL | Enum::Tuple(/* i32 */); | +++++++++ error[E0533]: expected value, found struct variant `Enum::Struct` --> $DIR/incorrect-variant-literal.rs:16:5 | LL | Enum::Struct(); | ^^^^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL - Enum::Struct(); LL + Enum::Struct { x: /* value */ }; | error[E0063]: missing field `0` in initializer of `Enum` --> $DIR/incorrect-variant-literal.rs:18:5 | LL | Enum::Tuple {}; | ^^^^^^^^^^^ missing `0` error[E0063]: missing field `x` in initializer of `Enum` --> $DIR/incorrect-variant-literal.rs:19:5 | LL | Enum::Struct {}; | ^^^^^^^^^^^^ missing `x` error[E0618]: expected function, found `Enum` --> $DIR/incorrect-variant-literal.rs:20:5 | LL | Unit, | ---- `Enum::Unit` defined here ... LL | Enum::Unit(0); | ^^^^^^^^^^--- | | | call expression requires function error[E0533]: expected value, found struct variant `Enum::Struct` --> $DIR/incorrect-variant-literal.rs:22:5 | LL | Enum::Struct(0); | ^^^^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL - Enum::Struct(0); LL + Enum::Struct { x: /* value */ }; | error[E0559]: variant `Enum::Unit` has no field named `x` --> $DIR/incorrect-variant-literal.rs:23:18 | LL | Enum::Unit { x: 0 }; | ^ `Enum::Unit` does not have this field | = note: all struct fields are already assigned error[E0559]: variant `Enum::Tuple` has no field named `x` --> $DIR/incorrect-variant-literal.rs:24:19 | LL | Tuple(i32), | ----- `Enum::Tuple` defined here ... LL | Enum::Tuple { x: 0 }; | ^ field does not exist | help: `Enum::Tuple` is a tuple variant, use the appropriate syntax | LL - Enum::Tuple { x: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0618]: expected function, found `Enum` --> $DIR/incorrect-variant-literal.rs:26:5 | LL | Unit, | ---- `Enum::Unit` defined here ... LL | Enum::Unit(0, 0); | ^^^^^^^^^^------ | | | call expression requires function error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied --> $DIR/incorrect-variant-literal.rs:27:5 | LL | Enum::Tuple(0, 0); | ^^^^^^^^^^^ - unexpected argument #2 of type `{integer}` | note: tuple variant defined here --> $DIR/incorrect-variant-literal.rs:6:5 | LL | Tuple(i32), | ^^^^^ help: remove the extra argument | LL - Enum::Tuple(0, 0); LL + Enum::Tuple(0); | error[E0533]: expected value, found struct variant `Enum::Struct` --> $DIR/incorrect-variant-literal.rs:28:5 | LL | Enum::Struct(0, 0); | ^^^^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL - Enum::Struct(0, 0); LL + Enum::Struct { x: /* value */ }; | error[E0559]: variant `Enum::Unit` has no field named `x` --> $DIR/incorrect-variant-literal.rs:29:18 | LL | Enum::Unit { x: 0, y: 0 }; | ^ `Enum::Unit` does not have this field | = note: all struct fields are already assigned error[E0559]: variant `Enum::Unit` has no field named `y` --> $DIR/incorrect-variant-literal.rs:29:24 | LL | Enum::Unit { x: 0, y: 0 }; | ^ `Enum::Unit` does not have this field | = note: all struct fields are already assigned error[E0559]: variant `Enum::Tuple` has no field named `x` --> $DIR/incorrect-variant-literal.rs:31:19 | LL | Tuple(i32), | ----- `Enum::Tuple` defined here ... LL | Enum::Tuple { x: 0, y: 0 }; | ^ field does not exist | help: `Enum::Tuple` is a tuple variant, use the appropriate syntax | LL - Enum::Tuple { x: 0, y: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0559]: variant `Enum::Tuple` has no field named `y` --> $DIR/incorrect-variant-literal.rs:31:25 | LL | Tuple(i32), | ----- `Enum::Tuple` defined here ... LL | Enum::Tuple { x: 0, y: 0 }; | ^ field does not exist | help: `Enum::Tuple` is a tuple variant, use the appropriate syntax | LL - Enum::Tuple { x: 0, y: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0559]: variant `Enum::Struct` has no field named `y` --> $DIR/incorrect-variant-literal.rs:33:26 | LL | Enum::Struct { x: 0, y: 0 }; | ^ `Enum::Struct` does not have this field | = note: all struct fields are already assigned error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:34:11 | LL | enum Enum { | --------- variant or associated item `unit` not found for this enum ... LL | Enum::unit; | ^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name (notice the capitalization) | LL - Enum::unit; LL + Enum::Unit; | error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:35:11 | LL | enum Enum { | --------- variant or associated item `tuple` not found for this enum ... LL | Enum::tuple; | ^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::tuple; LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:36:11 | LL | enum Enum { | --------- variant or associated item `r#struct` not found for this enum ... LL | Enum::r#struct; | ^^^^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::r#struct; LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:37:11 | LL | enum Enum { | --------- variant or associated item `unit` not found for this enum ... LL | Enum::unit(); | ^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::unit(); LL + Enum::Unit; | error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:38:11 | LL | enum Enum { | --------- variant or associated item `tuple` not found for this enum ... LL | Enum::tuple(); | ^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::tuple(); LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:39:11 | LL | enum Enum { | --------- variant or associated item `r#struct` not found for this enum ... LL | Enum::r#struct(); | ^^^^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::r#struct(); LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant named `unit` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:40:11 | LL | enum Enum { | --------- variant `unit` not found here ... LL | Enum::unit {}; | ^^^^ | help: there is a variant with a similar name | LL - Enum::unit {}; LL + Enum::Unit; | error[E0599]: no variant named `tuple` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:41:11 | LL | enum Enum { | --------- variant `tuple` not found here ... LL | Enum::tuple {}; | ^^^^^ | help: there is a variant with a similar name | LL - Enum::tuple {}; LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant named `r#struct` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:42:11 | LL | enum Enum { | --------- variant `r#struct` not found here ... LL | Enum::r#struct {}; | ^^^^^^^^ | help: there is a variant with a similar name | LL - Enum::r#struct {}; LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:43:11 | LL | enum Enum { | --------- variant or associated item `unit` not found for this enum ... LL | Enum::unit(0); | ^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::unit(0); LL + Enum::Unit; | error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:44:11 | LL | enum Enum { | --------- variant or associated item `tuple` not found for this enum ... LL | Enum::tuple(0); | ^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::tuple(0); LL + Enum::Tuple(0); | error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:45:11 | LL | enum Enum { | --------- variant or associated item `r#struct` not found for this enum ... LL | Enum::r#struct(0); | ^^^^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::r#struct(0); LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant named `unit` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:46:11 | LL | enum Enum { | --------- variant `unit` not found here ... LL | Enum::unit { x: 0 }; | ^^^^ | help: there is a variant with a similar name | LL - Enum::unit { x: 0 }; LL + Enum::Unit; | error[E0599]: no variant named `tuple` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:47:11 | LL | enum Enum { | --------- variant `tuple` not found here ... LL | Enum::tuple { x: 0 }; | ^^^^^ | help: there is a variant with a similar name | LL - Enum::tuple { x: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant named `r#struct` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:48:11 | LL | enum Enum { | --------- variant `r#struct` not found here ... LL | Enum::r#struct { x: 0 }; | ^^^^^^^^ | help: there is a variant with a similar name | LL - Enum::r#struct { x: 0 }; LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:49:11 | LL | enum Enum { | --------- variant or associated item `unit` not found for this enum ... LL | Enum::unit(0, 0); | ^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::unit(0, 0); LL + Enum::Unit; | error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:50:11 | LL | enum Enum { | --------- variant or associated item `tuple` not found for this enum ... LL | Enum::tuple(0, 0); | ^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::tuple(0, 0); LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:51:11 | LL | enum Enum { | --------- variant or associated item `r#struct` not found for this enum ... LL | Enum::r#struct(0, 0); | ^^^^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::r#struct(0, 0); LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant named `unit` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:52:11 | LL | enum Enum { | --------- variant `unit` not found here ... LL | Enum::unit { x: 0, y: 0 }; | ^^^^ | help: there is a variant with a similar name | LL - Enum::unit { x: 0, y: 0 }; LL + Enum::Unit; | error[E0599]: no variant named `tuple` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:53:11 | LL | enum Enum { | --------- variant `tuple` not found here ... LL | Enum::tuple { x: 0, y: 0 }; | ^^^^^ | help: there is a variant with a similar name | LL - Enum::tuple { x: 0, y: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant named `r#struct` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:54:11 | LL | enum Enum { | --------- variant `r#struct` not found here ... LL | Enum::r#struct { x: 0, y: 0 }; | ^^^^^^^^ | help: there is a variant with a similar name | LL - Enum::r#struct { x: 0, y: 0 }; LL + Enum::Struct { x: /* value */ }; | error: aborting due to 39 previous errors Some errors have detailed explanations: E0061, E0063, E0533, E0559, E0599, E0618. For more information about an error, try `rustc --explain E0061`.