@@ -5,7 +5,13 @@ LL | enum Shape {
55 | ---------- variant `Squareee` not found here
66...
77LL | println!("My shape is {:?}", Shape::Squareee { size: 5});
8- | ^^^^^^^^ help: there is a variant with a similar name: `Square`
8+ | ^^^^^^^^
9+ |
10+ help: there is a variant with a similar name
11+ |
12+ LL - println!("My shape is {:?}", Shape::Squareee { size: 5});
13+ LL + println!("My shape is {:?}", Shape::Square { size: 5});
14+ |
915
1016error[E0599]: no variant named `Circl` found for enum `Shape`
1117 --> $DIR/suggest-variants.rs:13:41
@@ -14,7 +20,13 @@ LL | enum Shape {
1420 | ---------- variant `Circl` not found here
1521...
1622LL | println!("My shape is {:?}", Shape::Circl { size: 5});
17- | ^^^^^ help: there is a variant with a similar name: `Circle`
23+ | ^^^^^
24+ |
25+ help: there is a variant with a similar name
26+ |
27+ LL - println!("My shape is {:?}", Shape::Circl { size: 5});
28+ LL + println!("My shape is {:?}", Shape::Circle { size: 5});
29+ |
1830
1931error[E0599]: no variant named `Rombus` found for enum `Shape`
2032 --> $DIR/suggest-variants.rs:14:41
@@ -32,10 +44,13 @@ LL | enum Shape {
3244 | ---------- variant or associated item `Squareee` not found for this enum
3345...
3446LL | Shape::Squareee;
35- | ^^^^^^^^
36- | |
37- | variant or associated item not found in `Shape`
38- | help: there is a variant with a similar name: `Square`
47+ | ^^^^^^^^ variant or associated item not found in `Shape`
48+ |
49+ help: there is a variant with a similar name
50+ |
51+ LL - Shape::Squareee;
52+ LL + Shape::Square;
53+ |
3954
4055error[E0599]: no variant or associated item named `Circl` found for enum `Shape` in the current scope
4156 --> $DIR/suggest-variants.rs:16:12
@@ -44,10 +59,13 @@ LL | enum Shape {
4459 | ---------- variant or associated item `Circl` not found for this enum
4560...
4661LL | Shape::Circl;
47- | ^^^^^
48- | |
49- | variant or associated item not found in `Shape`
50- | help: there is a variant with a similar name: `Circle`
62+ | ^^^^^ variant or associated item not found in `Shape`
63+ |
64+ help: there is a variant with a similar name
65+ |
66+ LL - Shape::Circl;
67+ LL + Shape::Circle;
68+ |
5169
5270error[E0599]: no variant or associated item named `Rombus` found for enum `Shape` in the current scope
5371 --> $DIR/suggest-variants.rs:17:12
0 commit comments