]> git.lizzy.rs Git - rust.git/blob - src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns.rs
Auto merge of #85690 - bstrie:m2_arena, r=jackh726,nagisa
[rust.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 }