]> git.lizzy.rs Git - rust.git/blob - tests/ui/patterns.fixed
Auto merge of #4809 - iankronquist:patch-1, r=flip1995
[rust.git] / tests / ui / patterns.fixed
1 // run-rustfix
2 #![allow(unused)]
3 #![warn(clippy::all)]
4
5 fn main() {
6     let v = Some(true);
7     let s = [0, 1, 2, 3, 4];
8     match v {
9         Some(x) => (),
10         y => (),
11     }
12     match v {
13         Some(x) => (),
14         y @ None => (), // no error
15     }
16     match s {
17         [x, inside @ .., y] => (), // no error
18         [..] => (),
19     }
20 }