]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/inc-range-pat.rs
Rollup merge of #60609 - spastorino:be-explicit-on-mem-replace-doc, r=Centril
[rust.git] / src / test / run-pass / inc-range-pat.rs
1 // Test old and new syntax for inclusive range patterns.
2
3 fn main() {
4     assert!(match 42 { 0 ... 100 => true, _ => false });
5     assert!(match 42 { 0 ..= 100 => true, _ => false });
6
7     assert!(match 'x' { 'a' ... 'z' => true, _ => false });
8     assert!(match 'x' { 'a' ..= 'z' => true, _ => false });
9 }