]> git.lizzy.rs Git - rust.git/blob - tests/ui/matches.stderr
Match underscore-prefixed variable also
[rust.git] / tests / ui / matches.stderr
1 error: `Err(_)` will match all errors, maybe not a good idea
2   --> $DIR/matches.rs:14:9
3    |
4 LL |         Err(_) => panic!("err"),
5    |         ^^^^^^
6    |
7    = note: `-D clippy::match-wild-err-arm` implied by `-D warnings`
8    = note: to remove this warning, match each error separately or use `unreachable!` macro
9
10 error: this `match` has identical arm bodies
11   --> $DIR/matches.rs:13:18
12    |
13 LL |         Ok(_) => println!("ok"),
14    |                  ^^^^^^^^^^^^^^
15    |
16    = note: `-D clippy::match-same-arms` implied by `-D warnings`
17 note: same as this
18   --> $DIR/matches.rs:12:18
19    |
20 LL |         Ok(3) => println!("ok"),
21    |                  ^^^^^^^^^^^^^^
22 help: consider refactoring into `Ok(3) | Ok(_)`
23   --> $DIR/matches.rs:12:9
24    |
25 LL |         Ok(3) => println!("ok"),
26    |         ^^^^^
27    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
28
29 error: `Err(_)` will match all errors, maybe not a good idea
30   --> $DIR/matches.rs:20:9
31    |
32 LL |         Err(_) => panic!(),
33    |         ^^^^^^
34    |
35    = note: to remove this warning, match each error separately or use `unreachable!` macro
36
37 error: this `match` has identical arm bodies
38   --> $DIR/matches.rs:19:18
39    |
40 LL |         Ok(_) => println!("ok"),
41    |                  ^^^^^^^^^^^^^^
42    |
43 note: same as this
44   --> $DIR/matches.rs:18:18
45    |
46 LL |         Ok(3) => println!("ok"),
47    |                  ^^^^^^^^^^^^^^
48 help: consider refactoring into `Ok(3) | Ok(_)`
49   --> $DIR/matches.rs:18:9
50    |
51 LL |         Ok(3) => println!("ok"),
52    |         ^^^^^
53    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
54
55 error: `Err(_)` will match all errors, maybe not a good idea
56   --> $DIR/matches.rs:26:9
57    |
58 LL |         Err(_) => {
59    |         ^^^^^^
60    |
61    = note: to remove this warning, match each error separately or use `unreachable!` macro
62
63 error: this `match` has identical arm bodies
64   --> $DIR/matches.rs:25:18
65    |
66 LL |         Ok(_) => println!("ok"),
67    |                  ^^^^^^^^^^^^^^
68    |
69 note: same as this
70   --> $DIR/matches.rs:24:18
71    |
72 LL |         Ok(3) => println!("ok"),
73    |                  ^^^^^^^^^^^^^^
74 help: consider refactoring into `Ok(3) | Ok(_)`
75   --> $DIR/matches.rs:24:9
76    |
77 LL |         Ok(3) => println!("ok"),
78    |         ^^^^^
79    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
80
81 error: `Err(_)` will match all errors, maybe not a good idea
82   --> $DIR/matches.rs:34:9
83    |
84 LL |         Err(_e) => panic!(),
85    |         ^^^^^^^
86    |
87    = note: to remove this warning, match each error separately or use `unreachable!` macro
88
89 error: this `match` has identical arm bodies
90   --> $DIR/matches.rs:33:18
91    |
92 LL |         Ok(_) => println!("ok"),
93    |                  ^^^^^^^^^^^^^^
94    |
95 note: same as this
96   --> $DIR/matches.rs:32:18
97    |
98 LL |         Ok(3) => println!("ok"),
99    |                  ^^^^^^^^^^^^^^
100 help: consider refactoring into `Ok(3) | Ok(_)`
101   --> $DIR/matches.rs:32:9
102    |
103 LL |         Ok(3) => println!("ok"),
104    |         ^^^^^
105    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
106
107 error: this `match` has identical arm bodies
108   --> $DIR/matches.rs:40:18
109    |
110 LL |         Ok(_) => println!("ok"),
111    |                  ^^^^^^^^^^^^^^
112    |
113 note: same as this
114   --> $DIR/matches.rs:39:18
115    |
116 LL |         Ok(3) => println!("ok"),
117    |                  ^^^^^^^^^^^^^^
118 help: consider refactoring into `Ok(3) | Ok(_)`
119   --> $DIR/matches.rs:39:9
120    |
121 LL |         Ok(3) => println!("ok"),
122    |         ^^^^^
123    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
124
125 error: this `match` has identical arm bodies
126   --> $DIR/matches.rs:47:18
127    |
128 LL |         Ok(_) => println!("ok"),
129    |                  ^^^^^^^^^^^^^^
130    |
131 note: same as this
132   --> $DIR/matches.rs:46:18
133    |
134 LL |         Ok(3) => println!("ok"),
135    |                  ^^^^^^^^^^^^^^
136 help: consider refactoring into `Ok(3) | Ok(_)`
137   --> $DIR/matches.rs:46:9
138    |
139 LL |         Ok(3) => println!("ok"),
140    |         ^^^^^
141    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
142
143 error: this `match` has identical arm bodies
144   --> $DIR/matches.rs:54:18
145    |
146 LL |         Ok(_) => println!("ok"),
147    |                  ^^^^^^^^^^^^^^
148    |
149 note: same as this
150   --> $DIR/matches.rs:53:18
151    |
152 LL |         Ok(3) => println!("ok"),
153    |                  ^^^^^^^^^^^^^^
154 help: consider refactoring into `Ok(3) | Ok(_)`
155   --> $DIR/matches.rs:53:9
156    |
157 LL |         Ok(3) => println!("ok"),
158    |         ^^^^^
159    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
160
161 error: this `match` has identical arm bodies
162   --> $DIR/matches.rs:60:18
163    |
164 LL |         Ok(_) => println!("ok"),
165    |                  ^^^^^^^^^^^^^^
166    |
167 note: same as this
168   --> $DIR/matches.rs:59:18
169    |
170 LL |         Ok(3) => println!("ok"),
171    |                  ^^^^^^^^^^^^^^
172 help: consider refactoring into `Ok(3) | Ok(_)`
173   --> $DIR/matches.rs:59:9
174    |
175 LL |         Ok(3) => println!("ok"),
176    |         ^^^^^
177    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
178
179 error: this `match` has identical arm bodies
180   --> $DIR/matches.rs:66:18
181    |
182 LL |         Ok(_) => println!("ok"),
183    |                  ^^^^^^^^^^^^^^
184    |
185 note: same as this
186   --> $DIR/matches.rs:65:18
187    |
188 LL |         Ok(3) => println!("ok"),
189    |                  ^^^^^^^^^^^^^^
190 help: consider refactoring into `Ok(3) | Ok(_)`
191   --> $DIR/matches.rs:65:9
192    |
193 LL |         Ok(3) => println!("ok"),
194    |         ^^^^^
195    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
196
197 error: this `match` has identical arm bodies
198   --> $DIR/matches.rs:89:29
199    |
200 LL |         (Ok(_), Some(x)) => println!("ok {}", x),
201    |                             ^^^^^^^^^^^^^^^^^^^^
202    |
203 note: same as this
204   --> $DIR/matches.rs:88:29
205    |
206 LL |         (Ok(x), Some(_)) => println!("ok {}", x),
207    |                             ^^^^^^^^^^^^^^^^^^^^
208 help: consider refactoring into `(Ok(x), Some(_)) | (Ok(_), Some(x))`
209   --> $DIR/matches.rs:88:9
210    |
211 LL |         (Ok(x), Some(_)) => println!("ok {}", x),
212    |         ^^^^^^^^^^^^^^^^
213    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
214
215 error: this `match` has identical arm bodies
216   --> $DIR/matches.rs:104:18
217    |
218 LL |         Ok(_) => println!("ok"),
219    |                  ^^^^^^^^^^^^^^
220    |
221 note: same as this
222   --> $DIR/matches.rs:103:18
223    |
224 LL |         Ok(3) => println!("ok"),
225    |                  ^^^^^^^^^^^^^^
226 help: consider refactoring into `Ok(3) | Ok(_)`
227   --> $DIR/matches.rs:103:9
228    |
229 LL |         Ok(3) => println!("ok"),
230    |         ^^^^^
231    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
232
233 error: aborting due to 15 previous errors
234