]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/inc-range-pat.rs
Rollup merge of #61389 - Zoxc:arena-cleanup, r=eddyb
[rust.git] / src / test / run-pass / inc-range-pat.rs
1 // Test old and new syntax for inclusive range patterns.
2
3 #![allow(ellipsis_inclusive_range_patterns)]
4
5 fn main() {
6     assert!(match 42 { 0 ... 100 => true, _ => false });
7     assert!(match 42 { 0 ..= 100 => true, _ => false });
8
9     assert!(match 'x' { 'a' ... 'z' => true, _ => false });
10     assert!(match 'x' { 'a' ..= 'z' => true, _ => false });
11 }