Skip to content

Commit 522a9f8

Browse files
committed
fix clippy tests
1 parent 720a64a commit 522a9f8

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

src/tools/clippy/tests/ui/match_same_arms.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ note: `_` wildcard arm here
99
--> tests/ui/match_same_arms.rs:14:9
1010
|
1111
LL | _ => 0,
12-
| ^^^^^^
12+
| ^^^^^^^
1313
= note: `-D clippy::match-same-arms` implied by `-D warnings`
1414
= help: to override `-D warnings` add `#[allow(clippy::match_same_arms)]`
1515

1616
error: this match arm has an identical body to another arm
1717
--> tests/ui/match_same_arms.rs:18:9
1818
|
1919
LL | (1, .., 3) => 42,
20-
| ^^^^^^^^^^^^^^^^
20+
| ^^^^^^^^^^^^^^^^^
2121
|
2222
= help: try changing either arm body
2323
help: or try merging the arm patterns and removing the obsolete arm
@@ -30,7 +30,7 @@ error: this match arm has an identical body to another arm
3030
--> tests/ui/match_same_arms.rs:25:9
3131
|
3232
LL | 51 => 1,
33-
| ^^^^^^^
33+
| ^^^^^^^^
3434
|
3535
= help: try changing either arm body
3636
help: or try merging the arm patterns and removing the obsolete arm
@@ -44,7 +44,7 @@ error: this match arm has an identical body to another arm
4444
--> tests/ui/match_same_arms.rs:26:9
4545
|
4646
LL | 41 => 2,
47-
| ^^^^^^^
47+
| ^^^^^^^^
4848
|
4949
= help: try changing either arm body
5050
help: or try merging the arm patterns and removing the obsolete arm
@@ -57,7 +57,7 @@ error: this match arm has an identical body to another arm
5757
--> tests/ui/match_same_arms.rs:33:9
5858
|
5959
LL | 2 => 2,
60-
| ^^^^^^
60+
| ^^^^^^^
6161
|
6262
= help: try changing either arm body
6363
help: or try merging the arm patterns and removing the obsolete arm
@@ -71,7 +71,7 @@ error: this match arm has an identical body to another arm
7171
--> tests/ui/match_same_arms.rs:35:9
7272
|
7373
LL | 3 => 2,
74-
| ^^^^^^
74+
| ^^^^^^^
7575
|
7676
= help: try changing either arm body
7777
help: or try merging the arm patterns and removing the obsolete arm
@@ -85,7 +85,7 @@ error: this match arm has an identical body to another arm
8585
--> tests/ui/match_same_arms.rs:33:9
8686
|
8787
LL | 2 => 2,
88-
| ^^^^^^
88+
| ^^^^^^^
8989
|
9090
= help: try changing either arm body
9191
help: or try merging the arm patterns and removing the obsolete arm
@@ -99,7 +99,7 @@ error: this match arm has an identical body to another arm
9999
--> tests/ui/match_same_arms.rs:52:17
100100
|
101101
LL | CommandInfo::External { name, .. } => name.to_string(),
102-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103103
|
104104
= help: try changing either arm body
105105
help: or try merging the arm patterns and removing the obsolete arm

src/tools/clippy/tests/ui/match_same_arms2.stderr

+14-14
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ LL | | if true {
2121
... |
2222
LL | | a
2323
LL | | },
24-
| |_________^
24+
| |__________^
2525
= note: `-D clippy::match-same-arms` implied by `-D warnings`
2626
= help: to override `-D warnings` add `#[allow(clippy::match_same_arms)]`
2727

2828
error: this match arm has an identical body to another arm
2929
--> tests/ui/match_same_arms2.rs:40:9
3030
|
3131
LL | 51 => foo(),
32-
| ^^^^^^^^^^^
32+
| ^^^^^^^^^^^^
3333
|
3434
= help: try changing either arm body
3535
help: or try merging the arm patterns and removing the obsolete arm
@@ -43,7 +43,7 @@ error: this match arm has an identical body to another arm
4343
--> tests/ui/match_same_arms2.rs:46:9
4444
|
4545
LL | None => 24,
46-
| ^^^^^^^^^^
46+
| ^^^^^^^^^^^
4747
|
4848
= help: try changing either arm body
4949
help: or try merging the arm patterns and removing the obsolete arm
@@ -57,7 +57,7 @@ error: this match arm has an identical body to another arm
5757
--> tests/ui/match_same_arms2.rs:68:9
5858
|
5959
LL | (None, Some(a)) => bar(a),
60-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
60+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6161
|
6262
= help: try changing either arm body
6363
help: or try merging the arm patterns and removing the obsolete arm
@@ -71,7 +71,7 @@ error: this match arm has an identical body to another arm
7171
--> tests/ui/match_same_arms2.rs:82:9
7272
|
7373
LL | (None, Some(a)) if a == 42 => a,
74-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7575
|
7676
= help: try changing either arm body
7777
help: or try merging the arm patterns and removing the obsolete arm
@@ -85,7 +85,7 @@ error: this match arm has an identical body to another arm
8585
--> tests/ui/match_same_arms2.rs:87:9
8686
|
8787
LL | (Some(a), ..) => bar(a),
88-
| ^^^^^^^^^^^^^^^^^^^^^^^
88+
| ^^^^^^^^^^^^^^^^^^^^^^^^
8989
|
9090
= help: try changing either arm body
9191
help: or try merging the arm patterns and removing the obsolete arm
@@ -98,7 +98,7 @@ error: this match arm has an identical body to another arm
9898
--> tests/ui/match_same_arms2.rs:121:9
9999
|
100100
LL | (Ok(x), Some(_)) => println!("ok {}", x),
101-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102102
|
103103
= help: try changing either arm body
104104
help: or try merging the arm patterns and removing the obsolete arm
@@ -111,7 +111,7 @@ error: this match arm has an identical body to another arm
111111
--> tests/ui/match_same_arms2.rs:137:9
112112
|
113113
LL | Ok(_) => println!("ok"),
114-
| ^^^^^^^^^^^^^^^^^^^^^^^
114+
| ^^^^^^^^^^^^^^^^^^^^^^^^
115115
|
116116
= help: try changing either arm body
117117
help: or try merging the arm patterns and removing the obsolete arm
@@ -127,7 +127,7 @@ error: this match arm has an identical body to another arm
127127
LL | / 1 => {
128128
LL | | empty!(0);
129129
LL | | },
130-
| |_________^
130+
| |__________^
131131
|
132132
= help: try changing either arm body
133133
help: or try merging the arm patterns and removing the obsolete arm
@@ -143,7 +143,7 @@ error: this match arm has an identical body to another arm
143143
--> tests/ui/match_same_arms2.rs:215:9
144144
|
145145
LL | Foo::X(0) => 1,
146-
| ^^^^^^^^^^^^^^
146+
| ^^^^^^^^^^^^^^^
147147
|
148148
= help: try changing either arm body
149149
help: or try merging the arm patterns and removing the obsolete arm
@@ -157,7 +157,7 @@ error: this match arm has an identical body to another arm
157157
--> tests/ui/match_same_arms2.rs:225:9
158158
|
159159
LL | Foo::Z(_) => 1,
160-
| ^^^^^^^^^^^^^^
160+
| ^^^^^^^^^^^^^^^
161161
|
162162
= help: try changing either arm body
163163
help: or try merging the arm patterns and removing the obsolete arm
@@ -170,7 +170,7 @@ error: this match arm has an identical body to another arm
170170
--> tests/ui/match_same_arms2.rs:248:9
171171
|
172172
LL | Some(Bar { y: 0, x: 5, .. }) => 1,
173-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174174
|
175175
= help: try changing either arm body
176176
help: or try merging the arm patterns and removing the obsolete arm
@@ -184,7 +184,7 @@ error: this match arm has an identical body to another arm
184184
--> tests/ui/match_same_arms2.rs:262:9
185185
|
186186
LL | 1 => cfg!(not_enable),
187-
| ^^^^^^^^^^^^^^^^^^^^^
187+
| ^^^^^^^^^^^^^^^^^^^^^^
188188
|
189189
= help: try changing either arm body
190190
help: or try merging the arm patterns and removing the obsolete arm
@@ -198,7 +198,7 @@ error: this match arm has an identical body to another arm
198198
--> tests/ui/match_same_arms2.rs:278:17
199199
|
200200
LL | MaybeStaticStr::Borrowed(s) => s,
201-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
201+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202202
|
203203
= help: try changing either arm body
204204
help: or try merging the arm patterns and removing the obsolete arm

src/tools/clippy/tests/ui/match_same_arms_non_exhaustive.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ note: `_` wildcard arm here
1010
--> tests/ui/match_same_arms_non_exhaustive.rs:46:9
1111
|
1212
LL | _ => repeat(),
13-
| ^^^^^^^^^^^^^
13+
| ^^^^^^^^^^^^^^
1414
= note: `-D clippy::match-same-arms` implied by `-D warnings`
1515
= help: to override `-D warnings` add `#[allow(clippy::match_same_arms)]`
1616

@@ -26,7 +26,7 @@ note: `_` wildcard arm here
2626
--> tests/ui/match_same_arms_non_exhaustive.rs:60:13
2727
|
2828
LL | _ => repeat(),
29-
| ^^^^^^^^^^^^^
29+
| ^^^^^^^^^^^^^^
3030

3131
error: aborting due to 2 previous errors
3232

0 commit comments

Comments
 (0)