1
1
error: this `match` has identical arm bodies
2
- --> $DIR/copies .rs:37:14
2
+ --> $DIR/match_same_arms .rs:37:14
3
3
|
4
4
LL | _ => {
5
5
| ______________^
@@ -13,7 +13,7 @@ LL | | },
13
13
|
14
14
= note: `-D clippy::match-same-arms` implied by `-D warnings`
15
15
note: same as this
16
- --> $DIR/copies .rs:28:15
16
+ --> $DIR/match_same_arms .rs:28:15
17
17
|
18
18
LL | 42 => {
19
19
| _______________^
@@ -25,7 +25,7 @@ LL | | a
25
25
LL | | },
26
26
| |_________^
27
27
note: `42` has the same arm body as the `_` wildcard, consider removing it`
28
- --> $DIR/copies .rs:28:15
28
+ --> $DIR/match_same_arms .rs:28:15
29
29
|
30
30
LL | 42 => {
31
31
| _______________^
@@ -38,103 +38,103 @@ LL | | },
38
38
| |_________^
39
39
40
40
error: this `match` has identical arm bodies
41
- --> $DIR/copies .rs:52:14
41
+ --> $DIR/match_same_arms .rs:52:14
42
42
|
43
43
LL | _ => 0, //~ ERROR match arms have same body
44
44
| ^
45
45
|
46
46
note: same as this
47
- --> $DIR/copies .rs:50:19
47
+ --> $DIR/match_same_arms .rs:50:19
48
48
|
49
49
LL | Abc::A => 0,
50
50
| ^
51
51
note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
52
- --> $DIR/copies .rs:50:19
52
+ --> $DIR/match_same_arms .rs:50:19
53
53
|
54
54
LL | Abc::A => 0,
55
55
| ^
56
56
57
57
error: this `match` has identical arm bodies
58
- --> $DIR/copies .rs:57:15
58
+ --> $DIR/match_same_arms .rs:57:15
59
59
|
60
60
LL | 51 => foo(), //~ ERROR match arms have same body
61
61
| ^^^^^
62
62
|
63
63
note: same as this
64
- --> $DIR/copies .rs:56:15
64
+ --> $DIR/match_same_arms .rs:56:15
65
65
|
66
66
LL | 42 => foo(),
67
67
| ^^^^^
68
68
note: consider refactoring into `42 | 51`
69
- --> $DIR/copies .rs:56:15
69
+ --> $DIR/match_same_arms .rs:56:15
70
70
|
71
71
LL | 42 => foo(),
72
72
| ^^^^^
73
73
74
74
error: this `match` has identical arm bodies
75
- --> $DIR/copies .rs:63:17
75
+ --> $DIR/match_same_arms .rs:63:17
76
76
|
77
77
LL | None => 24, //~ ERROR match arms have same body
78
78
| ^^
79
79
|
80
80
note: same as this
81
- --> $DIR/copies .rs:62:20
81
+ --> $DIR/match_same_arms .rs:62:20
82
82
|
83
83
LL | Some(_) => 24,
84
84
| ^^
85
85
note: consider refactoring into `Some(_) | None`
86
- --> $DIR/copies .rs:62:20
86
+ --> $DIR/match_same_arms .rs:62:20
87
87
|
88
88
LL | Some(_) => 24,
89
89
| ^^
90
90
91
91
error: this `match` has identical arm bodies
92
- --> $DIR/copies .rs:85:28
92
+ --> $DIR/match_same_arms .rs:85:28
93
93
|
94
94
LL | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
95
95
| ^^^^^^
96
96
|
97
97
note: same as this
98
- --> $DIR/copies .rs:84:28
98
+ --> $DIR/match_same_arms .rs:84:28
99
99
|
100
100
LL | (Some(a), None) => bar(a),
101
101
| ^^^^^^
102
102
note: consider refactoring into `(Some(a), None) | (None, Some(a))`
103
- --> $DIR/copies .rs:84:28
103
+ --> $DIR/match_same_arms .rs:84:28
104
104
|
105
105
LL | (Some(a), None) => bar(a),
106
106
| ^^^^^^
107
107
108
108
error: this `match` has identical arm bodies
109
- --> $DIR/copies .rs:91:26
109
+ --> $DIR/match_same_arms .rs:91:26
110
110
|
111
111
LL | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
112
112
| ^^^^^^
113
113
|
114
114
note: same as this
115
- --> $DIR/copies .rs:90:26
115
+ --> $DIR/match_same_arms .rs:90:26
116
116
|
117
117
LL | (Some(a), ..) => bar(a),
118
118
| ^^^^^^
119
119
note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
120
- --> $DIR/copies .rs:90:26
120
+ --> $DIR/match_same_arms .rs:90:26
121
121
|
122
122
LL | (Some(a), ..) => bar(a),
123
123
| ^^^^^^
124
124
125
125
error: this `match` has identical arm bodies
126
- --> $DIR/copies .rs:97:20
126
+ --> $DIR/match_same_arms .rs:97:20
127
127
|
128
128
LL | (.., 3) => 42, //~ ERROR match arms have same body
129
129
| ^^
130
130
|
131
131
note: same as this
132
- --> $DIR/copies .rs:96:23
132
+ --> $DIR/match_same_arms .rs:96:23
133
133
|
134
134
LL | (1, .., 3) => 42,
135
135
| ^^
136
136
note: consider refactoring into `(1, .., 3) | (.., 3)`
137
- --> $DIR/copies .rs:96:23
137
+ --> $DIR/match_same_arms .rs:96:23
138
138
|
139
139
LL | (1, .., 3) => 42,
140
140
| ^^
0 commit comments