@@ -2,7 +2,7 @@ error: this match arm has an identical body to the `_` wildcard arm
2
2
--> tests/ui/match_same_arms.rs:12:9
3
3
|
4
4
LL | Abc::A => 0,
5
- | ^^^^^^^^^^^ help: try removing the arm
5
+ | ^^^^^^^^^^^^^ help: try removing the arm
6
6
|
7
7
= help: or try changing either arm body
8
8
note: `_` wildcard arm here
@@ -17,106 +17,114 @@ error: this match arm has an identical body to another arm
17
17
--> tests/ui/match_same_arms.rs:18:9
18
18
|
19
19
LL | (1, .., 3) => 42,
20
- | ----------^^^^^^
21
- | |
22
- | help: try merging the arm patterns: `(1, .., 3) | (.., 3)`
20
+ | ^^^^^^^^^^^^^^^^
23
21
|
24
- = help: or try changing either arm body
25
- note: other arm here
26
- --> tests/ui/match_same_arms.rs:19:9
22
+ = help: try changing either arm body
23
+ help: or try merging the arm patterns
24
+ |
25
+ LL | (1, .., 3) | (.., 3) => 42,
26
+ | ~~~~~~~~~~~~~~~~~~~~
27
+ help: and remove this obsolete arm
28
+ |
29
+ LL - (.., 3) => 42,
27
30
|
28
- LL | (.., 3) => 42,
29
- | ^^^^^^^^^^^^^
30
31
31
32
error: this match arm has an identical body to another arm
32
33
--> tests/ui/match_same_arms.rs:25:9
33
34
|
34
35
LL | 51 => 1,
35
- | --^^^^^
36
- | |
37
- | help: try merging the arm patterns: `51 | 42`
36
+ | ^^^^^^^
38
37
|
39
- = help: or try changing either arm body
40
- note: other arm here
41
- --> tests/ui/match_same_arms.rs:24:9
38
+ = help: try changing either arm body
39
+ help: or try merging the arm patterns
40
+ |
41
+ LL | 51 | 42 => 1,
42
+ | ~~~~~~~
43
+ help: and remove this obsolete arm
44
+ |
45
+ LL - 42 => 1,
42
46
|
43
- LL | 42 => 1,
44
- | ^^^^^^^
45
47
46
48
error: this match arm has an identical body to another arm
47
49
--> tests/ui/match_same_arms.rs:26:9
48
50
|
49
51
LL | 41 => 2,
50
- | --^^^^^
51
- | |
52
- | help: try merging the arm patterns: `41 | 52`
52
+ | ^^^^^^^
53
53
|
54
- = help: or try changing either arm body
55
- note: other arm here
56
- --> tests/ui/match_same_arms.rs:27:9
54
+ = help: try changing either arm body
55
+ help: or try merging the arm patterns
56
+ |
57
+ LL | 41 | 52 => 2,
58
+ | ~~~~~~~
59
+ help: and remove this obsolete arm
60
+ |
61
+ LL - 52 => 2,
57
62
|
58
- LL | 52 => 2,
59
- | ^^^^^^^
60
63
61
64
error: this match arm has an identical body to another arm
62
65
--> tests/ui/match_same_arms.rs:33:9
63
66
|
64
67
LL | 2 => 2,
65
- | -^^^^^
66
- | |
67
- | help: try merging the arm patterns: `2 | 1`
68
+ | ^^^^^^
68
69
|
69
- = help: or try changing either arm body
70
- note: other arm here
71
- --> tests/ui/match_same_arms.rs:32:9
70
+ = help: try changing either arm body
71
+ help: or try merging the arm patterns
72
+ |
73
+ LL | 2 | 1 => 2,
74
+ | ~~~~~
75
+ help: and remove this obsolete arm
76
+ |
77
+ LL - 1 => 2,
72
78
|
73
- LL | 1 => 2,
74
- | ^^^^^^
75
79
76
80
error: this match arm has an identical body to another arm
77
81
--> tests/ui/match_same_arms.rs:35:9
78
82
|
79
83
LL | 3 => 2,
80
- | -^^^^^
81
- | |
82
- | help: try merging the arm patterns: `3 | 1`
84
+ | ^^^^^^
83
85
|
84
- = help: or try changing either arm body
85
- note: other arm here
86
- --> tests/ui/match_same_arms.rs:32:9
86
+ = help: try changing either arm body
87
+ help: or try merging the arm patterns
88
+ |
89
+ LL | 3 | 1 => 2,
90
+ | ~~~~~
91
+ help: and remove this obsolete arm
92
+ |
93
+ LL - 1 => 2,
87
94
|
88
- LL | 1 => 2,
89
- | ^^^^^^
90
95
91
96
error: this match arm has an identical body to another arm
92
97
--> tests/ui/match_same_arms.rs:33:9
93
98
|
94
99
LL | 2 => 2,
95
- | -^^^^^
96
- | |
97
- | help: try merging the arm patterns: `2 | 3`
100
+ | ^^^^^^
98
101
|
99
- = help: or try changing either arm body
100
- note: other arm here
101
- --> tests/ui/match_same_arms.rs:35:9
102
+ = help: try changing either arm body
103
+ help: or try merging the arm patterns
104
+ |
105
+ LL | 2 | 3 => 2,
106
+ | ~~~~~
107
+ help: and remove this obsolete arm
108
+ |
109
+ LL - 3 => 2,
110
+ LL +
102
111
|
103
- LL | 3 => 2,
104
- | ^^^^^^
105
112
106
113
error: this match arm has an identical body to another arm
107
114
--> tests/ui/match_same_arms.rs:52:17
108
115
|
109
116
LL | CommandInfo::External { name, .. } => name.to_string(),
110
- | ----------------------------------^^^^^^^^^^^^^^^^^^^^
111
- | |
112
- | help: try merging the arm patterns: `CommandInfo::External { name, .. } | CommandInfo::BuiltIn { name, .. }`
117
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113
118
|
114
- = help: or try changing either arm body
115
- note: other arm here
116
- --> tests/ui/match_same_arms.rs:51:17
119
+ = help: try changing either arm body
120
+ help: or try merging the arm patterns
121
+ |
122
+ LL | CommandInfo::External { name, .. } | CommandInfo::BuiltIn { name, .. } => name.to_string(),
123
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124
+ help: and remove this obsolete arm
125
+ |
126
+ LL - CommandInfo::BuiltIn { name, .. } => name.to_string(),
117
127
|
118
- LL | CommandInfo::BuiltIn { name, .. } => name.to_string(),
119
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120
128
121
129
error: aborting due to 8 previous errors
122
130
0 commit comments