]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_same_arms.stderr
0549886a1e8ec7ad8a52f497c1ff647033e63528
[rust.git] / tests / ui / match_same_arms.stderr
1 error: this `match` has identical arm bodies
2   --> $DIR/match_same_arms.rs:13:14
3    |
4 LL |         _ => 0, //~ ERROR match arms have same body
5    |              ^
6    |
7    = note: `-D clippy::match-same-arms` implied by `-D warnings`
8 note: same as this
9   --> $DIR/match_same_arms.rs:11:19
10    |
11 LL |         Abc::A => 0,
12    |                   ^
13 note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it
14   --> $DIR/match_same_arms.rs:11:19
15    |
16 LL |         Abc::A => 0,
17    |                   ^
18
19 error: this `match` has identical arm bodies
20   --> $DIR/match_same_arms.rs:18:20
21    |
22 LL |         (.., 3) => 42, //~ ERROR match arms have same body
23    |                    ^^
24    |
25 note: same as this
26   --> $DIR/match_same_arms.rs:17:23
27    |
28 LL |         (1, .., 3) => 42,
29    |                       ^^
30 help: consider refactoring into `(1, .., 3) | (.., 3)`
31   --> $DIR/match_same_arms.rs:17:9
32    |
33 LL |         (1, .., 3) => 42,
34    |         ^^^^^^^^^^
35
36 error: this `match` has identical arm bodies
37   --> $DIR/match_same_arms.rs:24:15
38    |
39 LL |         51 => 1, //~ ERROR match arms have same body
40    |               ^
41    |
42 note: same as this
43   --> $DIR/match_same_arms.rs:23:15
44    |
45 LL |         42 => 1,
46    |               ^
47 help: consider refactoring into `42 | 51`
48   --> $DIR/match_same_arms.rs:23:9
49    |
50 LL |         42 => 1,
51    |         ^^
52
53 error: this `match` has identical arm bodies
54   --> $DIR/match_same_arms.rs:26:15
55    |
56 LL |         52 => 2, //~ ERROR match arms have same body
57    |               ^
58    |
59 note: same as this
60   --> $DIR/match_same_arms.rs:25:15
61    |
62 LL |         41 => 2,
63    |               ^
64 help: consider refactoring into `41 | 52`
65   --> $DIR/match_same_arms.rs:25:9
66    |
67 LL |         41 => 2,
68    |         ^^
69
70 error: this `match` has identical arm bodies
71   --> $DIR/match_same_arms.rs:32:14
72    |
73 LL |         2 => 2, //~ ERROR 2nd matched arms have same body
74    |              ^
75    |
76 note: same as this
77   --> $DIR/match_same_arms.rs:31:14
78    |
79 LL |         1 => 2,
80    |              ^
81 help: consider refactoring into `1 | 2`
82   --> $DIR/match_same_arms.rs:31:9
83    |
84 LL |         1 => 2,
85    |         ^
86
87 error: this `match` has identical arm bodies
88   --> $DIR/match_same_arms.rs:33:14
89    |
90 LL |         3 => 2, //~ ERROR 3rd matched arms have same body
91    |              ^
92    |
93 note: same as this
94   --> $DIR/match_same_arms.rs:31:14
95    |
96 LL |         1 => 2,
97    |              ^
98 help: consider refactoring into `1 | 3`
99   --> $DIR/match_same_arms.rs:31:9
100    |
101 LL |         1 => 2,
102    |         ^
103
104 error: this `match` has identical arm bodies
105   --> $DIR/match_same_arms.rs:33:14
106    |
107 LL |         3 => 2, //~ ERROR 3rd matched arms have same body
108    |              ^
109    |
110 note: same as this
111   --> $DIR/match_same_arms.rs:32:14
112    |
113 LL |         2 => 2, //~ ERROR 2nd matched arms have same body
114    |              ^
115 help: consider refactoring into `2 | 3`
116   --> $DIR/match_same_arms.rs:32:9
117    |
118 LL |         2 => 2, //~ ERROR 2nd matched arms have same body
119    |         ^
120
121 error: this `match` has identical arm bodies
122   --> $DIR/match_same_arms.rs:50:55
123    |
124 LL |                 CommandInfo::External { name, .. } => name.to_string(),
125    |                                                       ^^^^^^^^^^^^^^^^
126    |
127 note: same as this
128   --> $DIR/match_same_arms.rs:49:54
129    |
130 LL |                 CommandInfo::BuiltIn { name, .. } => name.to_string(),
131    |                                                      ^^^^^^^^^^^^^^^^
132 help: consider refactoring into `CommandInfo::BuiltIn { name, .. } | CommandInfo::External { name, .. }`
133   --> $DIR/match_same_arms.rs:49:17
134    |
135 LL |                 CommandInfo::BuiltIn { name, .. } => name.to_string(),
136    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137
138 error: aborting due to 8 previous errors
139