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