mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
ec7a188f16
``` error[E0533]: expected value, found struct variant `E::Empty3` --> $DIR/empty-struct-braces-expr.rs:18:14 | LL | let e3 = E::Empty3; | ^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL | let e3 = E::Empty3 {}; | ++ ``` ``` error[E0533]: expected value, found struct variant `E::V` --> $DIR/struct-literal-variant-in-if.rs:10:13 | LL | if x == E::V { field } {} | ^^^^ not a value | help: you might have meant to create a new value of the struct | LL | if x == (E::V { field }) {} | + + ``` ``` error[E0618]: expected function, found enum variant `Enum::Unit` --> $DIR/suggestion-highlights.rs:15: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[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/suggestion-highlights.rs:36: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(/* i32 */); | ~~~~~~~~~~~~~~~~; | ```
78 lines
2.6 KiB
Plaintext
78 lines
2.6 KiB
Plaintext
error[E0599]: no variant named `Squareee` found for enum `Shape`
|
|
--> $DIR/suggest-variants.rs:12:41
|
|
|
|
|
LL | enum Shape {
|
|
| ---------- variant `Squareee` not found here
|
|
...
|
|
LL | println!("My shape is {:?}", Shape::Squareee { size: 5});
|
|
| ^^^^^^^^
|
|
|
|
|
help: there is a variant with a similar name
|
|
|
|
|
LL | println!("My shape is {:?}", Shape::Square { size: 5});
|
|
| ~~~~~~
|
|
|
|
error[E0599]: no variant named `Circl` found for enum `Shape`
|
|
--> $DIR/suggest-variants.rs:13:41
|
|
|
|
|
LL | enum Shape {
|
|
| ---------- variant `Circl` not found here
|
|
...
|
|
LL | println!("My shape is {:?}", Shape::Circl { size: 5});
|
|
| ^^^^^
|
|
|
|
|
help: there is a variant with a similar name
|
|
|
|
|
LL | println!("My shape is {:?}", Shape::Circle { size: 5});
|
|
| ~~~~~~
|
|
|
|
error[E0599]: no variant named `Rombus` found for enum `Shape`
|
|
--> $DIR/suggest-variants.rs:14:41
|
|
|
|
|
LL | enum Shape {
|
|
| ---------- variant `Rombus` not found here
|
|
...
|
|
LL | println!("My shape is {:?}", Shape::Rombus{ size: 5});
|
|
| ^^^^^^ variant not found in `Shape`
|
|
|
|
error[E0599]: no variant or associated item named `Squareee` found for enum `Shape` in the current scope
|
|
--> $DIR/suggest-variants.rs:15:12
|
|
|
|
|
LL | enum Shape {
|
|
| ---------- variant or associated item `Squareee` not found for this enum
|
|
...
|
|
LL | Shape::Squareee;
|
|
| ^^^^^^^^ variant or associated item not found in `Shape`
|
|
|
|
|
help: there is a variant with a similar name
|
|
|
|
|
LL | Shape::Square { size: /* value */ };
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
error[E0599]: no variant or associated item named `Circl` found for enum `Shape` in the current scope
|
|
--> $DIR/suggest-variants.rs:16:12
|
|
|
|
|
LL | enum Shape {
|
|
| ---------- variant or associated item `Circl` not found for this enum
|
|
...
|
|
LL | Shape::Circl;
|
|
| ^^^^^ variant or associated item not found in `Shape`
|
|
|
|
|
help: there is a variant with a similar name
|
|
|
|
|
LL | Shape::Circle { radius: /* value */ };
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
error[E0599]: no variant or associated item named `Rombus` found for enum `Shape` in the current scope
|
|
--> $DIR/suggest-variants.rs:17:12
|
|
|
|
|
LL | enum Shape {
|
|
| ---------- variant or associated item `Rombus` not found for this enum
|
|
...
|
|
LL | Shape::Rombus;
|
|
| ^^^^^^ variant or associated item not found in `Shape`
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|