2 #![allow(incomplete_features)]
3 #![feature(exclusive_range_pattern)]
4 #![feature(half_open_range_patterns)]
5 #![feature(inline_const)]
8 let mut if_lettable = vec![];
9 let mut first_or = vec![];
10 let mut or_two = vec![];
11 let mut range_from = vec![];
12 let mut bottom = vec![];
14 for x in -9 + 1..=(9 - 2) {
15 if let -1..=0 | 2..3 | 4 = x {
19 1 | -3..0 => first_or.push(x),
20 y @ (0..5 | 6) => or_two.push(y),
21 y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
22 y @ -5.. => range_from.push(y),
23 y @ ..-7 => assert_eq!(y, -8),
27 assert_eq!(if_lettable, [-1, 0, 2, 4]);
28 assert_eq!(first_or, [-3, -2, -1, 1]);
29 assert_eq!(or_two, [0, 2, 3, 4, 6]);
30 assert_eq!(range_from, [-5, -4, 7]);
31 assert_eq!(bottom, [-7, -6]);