]> git.lizzy.rs Git - rust.git/blob - tests/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / half-open-range-patterns / half-open-range-pats-ref-ambiguous-interp.rs
1 fn main() {}
2
3 #[cfg(FALSE)]
4 fn syntax() {
5     match &0 {
6         &0.. | _ => {}
7         //~^ ERROR the range pattern here has ambiguous interpretation
8         &0..= | _ => {}
9         //~^ ERROR the range pattern here has ambiguous interpretation
10         //~| ERROR inclusive range with no end
11         &0... | _ => {}
12         //~^ ERROR inclusive range with no end
13     }
14
15     match &0 {
16         &..0 | _ => {}
17         //~^ ERROR the range pattern here has ambiguous interpretation
18         &..=0 | _ => {}
19         //~^ ERROR the range pattern here has ambiguous interpretation
20         &...0 | _ => {}
21         //~^ ERROR the range pattern here has ambiguous interpretation
22         //~| ERROR range-to patterns with `...` are not allowed
23     }
24 }