]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/range-inclusive-pattern-precedence.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / binding / range-inclusive-pattern-precedence.rs
1 // run-pass
2 #![feature(box_patterns)]
3
4 const VALUE: usize = 21;
5
6 pub fn main() {
7     match &18 {
8         &(18..=18) => {}
9         _ => { unreachable!(); }
10     }
11     match &21 {
12         &(VALUE..=VALUE) => {}
13         _ => { unreachable!(); }
14     }
15     match Box::new(18) {
16         box (18..=18) => {}
17         _ => { unreachable!(); }
18     }
19     match Box::new(21) {
20         box (VALUE..=VALUE) => {}
21         _ => { unreachable!(); }
22     }
23 }