@@ -5,7 +5,13 @@ LL | enum Shape {
5
5
| ---------- variant `Squareee` not found here
6
6
...
7
7
LL | 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
+ |
9
15
10
16
error[E0599]: no variant named `Circl` found for enum `Shape`
11
17
--> $DIR/suggest-variants.rs:13:41
@@ -14,7 +20,13 @@ LL | enum Shape {
14
20
| ---------- variant `Circl` not found here
15
21
...
16
22
LL | 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
+ |
18
30
19
31
error[E0599]: no variant named `Rombus` found for enum `Shape`
20
32
--> $DIR/suggest-variants.rs:14:41
@@ -32,10 +44,13 @@ LL | enum Shape {
32
44
| ---------- variant or associated item `Squareee` not found for this enum
33
45
...
34
46
LL | 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
+ |
39
54
40
55
error[E0599]: no variant or associated item named `Circl` found for enum `Shape` in the current scope
41
56
--> $DIR/suggest-variants.rs:16:12
@@ -44,10 +59,13 @@ LL | enum Shape {
44
59
| ---------- variant or associated item `Circl` not found for this enum
45
60
...
46
61
LL | 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
+ |
51
69
52
70
error[E0599]: no variant or associated item named `Rombus` found for enum `Shape` in the current scope
53
71
--> $DIR/suggest-variants.rs:17:12
0 commit comments