]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/inferred-suffix-in-pattern-range.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / binding / inferred-suffix-in-pattern-range.rs
1 // run-pass
2
3 pub fn main() {
4     let x = 2;
5     let x_message = match x {
6       0 ..= 1    => { "not many".to_string() }
7       _          => { "lots".to_string() }
8     };
9     assert_eq!(x_message, "lots".to_string());
10
11     let y = 2;
12     let y_message = match y {
13       0 ..= 1    => { "not many".to_string() }
14       _          => { "lots".to_string() }
15     };
16     assert_eq!(y_message, "lots".to_string());
17
18     let z = 1u64;
19     let z_message = match z {
20       0 ..= 1    => { "not many".to_string() }
21       _          => { "lots".to_string() }
22     };
23     assert_eq!(z_message, "not many".to_string());
24 }