]> git.lizzy.rs Git - rust.git/blob - src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.rs
Rollup merge of #92959 - asquared31415:test-non-fn-help, r=estebank
[rust.git] / src / test / ui / half-open-range-patterns / half-open-range-pats-ref-ambiguous-interp.rs
1 #![feature(half_open_range_patterns)]
2
3 fn main() {}
4
5 #[cfg(FALSE)]
6 fn syntax() {
7     match &0 {
8         &0.. | _ => {}
9         //~^ ERROR the range pattern here has ambiguous interpretation
10         &0..= | _ => {}
11         //~^ ERROR the range pattern here has ambiguous interpretation
12         //~| ERROR inclusive range with no end
13         &0... | _ => {}
14         //~^ ERROR inclusive range with no end
15     }
16
17     match &0 {
18         &..0 | _ => {}
19         //~^ ERROR the range pattern here has ambiguous interpretation
20         &..=0 | _ => {}
21         //~^ ERROR the range pattern here has ambiguous interpretation
22         &...0 | _ => {}
23         //~^ ERROR the range pattern here has ambiguous interpretation
24         //~| ERROR range-to patterns with `...` are not allowed
25     }
26 }