]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_same_arms.stderr
removing unsafe from test fn's && renaming shrink to sugg_span
[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    = help: ...or consider changing the match arm bodies
36
37 error: this `match` has identical arm bodies
38   --> $DIR/match_same_arms.rs:24:15
39    |
40 LL |         51 => 1, //~ ERROR match arms have same body
41    |               ^
42    |
43 note: same as this
44   --> $DIR/match_same_arms.rs:23:15
45    |
46 LL |         42 => 1,
47    |               ^
48 help: consider refactoring into `42 | 51`
49   --> $DIR/match_same_arms.rs:23:9
50    |
51 LL |         42 => 1,
52    |         ^^
53    = help: ...or consider changing the match arm bodies
54
55 error: this `match` has identical arm bodies
56   --> $DIR/match_same_arms.rs:26:15
57    |
58 LL |         52 => 2, //~ ERROR match arms have same body
59    |               ^
60    |
61 note: same as this
62   --> $DIR/match_same_arms.rs:25:15
63    |
64 LL |         41 => 2,
65    |               ^
66 help: consider refactoring into `41 | 52`
67   --> $DIR/match_same_arms.rs:25:9
68    |
69 LL |         41 => 2,
70    |         ^^
71    = help: ...or consider changing the match arm bodies
72
73 error: this `match` has identical arm bodies
74   --> $DIR/match_same_arms.rs:32:14
75    |
76 LL |         2 => 2, //~ ERROR 2nd matched arms have same body
77    |              ^
78    |
79 note: same as this
80   --> $DIR/match_same_arms.rs:31:14
81    |
82 LL |         1 => 2,
83    |              ^
84 help: consider refactoring into `1 | 2`
85   --> $DIR/match_same_arms.rs:31:9
86    |
87 LL |         1 => 2,
88    |         ^
89    = help: ...or consider changing the match arm bodies
90
91 error: this `match` has identical arm bodies
92   --> $DIR/match_same_arms.rs:33:14
93    |
94 LL |         3 => 2, //~ ERROR 3rd matched arms have same body
95    |              ^
96    |
97 note: same as this
98   --> $DIR/match_same_arms.rs:31:14
99    |
100 LL |         1 => 2,
101    |              ^
102 help: consider refactoring into `1 | 3`
103   --> $DIR/match_same_arms.rs:31:9
104    |
105 LL |         1 => 2,
106    |         ^
107    = help: ...or consider changing the match arm bodies
108
109 error: this `match` has identical arm bodies
110   --> $DIR/match_same_arms.rs:50:55
111    |
112 LL |                 CommandInfo::External { name, .. } => name.to_string(),
113    |                                                       ^^^^^^^^^^^^^^^^
114    |
115 note: same as this
116   --> $DIR/match_same_arms.rs:49:54
117    |
118 LL |                 CommandInfo::BuiltIn { name, .. } => name.to_string(),
119    |                                                      ^^^^^^^^^^^^^^^^
120 help: consider refactoring into `CommandInfo::BuiltIn { name, .. } | CommandInfo::External { name, .. }`
121   --> $DIR/match_same_arms.rs:49:17
122    |
123 LL |                 CommandInfo::BuiltIn { name, .. } => name.to_string(),
124    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125    = help: ...or consider changing the match arm bodies
126
127 error: aborting due to 7 previous errors
128