]> git.proxmox.com Git - rustc.git/blob - src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / half-open-range-patterns / feature-gate-half-open-range-patterns.rs
1 #![feature(exclusive_range_pattern)]
2
3 fn main() {}
4
5 #[cfg(FALSE)]
6 fn foo() {
7 if let ..=5 = 0 {}
8 //~^ ERROR half-open range patterns are unstable
9 if let ...5 = 0 {}
10 //~^ ERROR half-open range patterns are unstable
11 //~| ERROR range-to patterns with `...` are not allowed
12 if let ..5 = 0 {}
13 //~^ ERROR half-open range patterns are unstable
14 if let 5..= = 0 {}
15 //~^ ERROR inclusive range with no end
16 if let 5... = 0 {}
17 //~^ ERROR inclusive range with no end
18 }