fn main() {
match [5..4, 99..105, 43..44] {
- [_, 99.., _] => {}, //~ ERROR unexpected token: `,`
+ [_, 99.., _] => {},
+ //~^ ERROR `X..` range patterns are not supported
+ //~| ERROR arbitrary expressions aren't allowed in patterns
+ //~| ERROR only char and numeric types are allowed in range patterns
_ => {},
}
}
fn main() {
match [5..4, 99..105, 43..44] {
- [_, 99..] => {}, //~ ERROR unexpected token: `]`
+ [_, 99..] => {},
+ //~^ ERROR `X..` range patterns are not supported
+ //~| ERROR arbitrary expressions aren't allowed in patterns
+ //~| ERROR pattern requires 2 elements but array has 3
+ //~| ERROR only char and numeric types are allowed in range patterns
_ => {},
}
}
fn main() {
match [5..4, 99..105, 43..44] {
- [..9, 99..100, _] => {}, //~ ERROR expected one of `,` or `]`, found `9`
+ [..9, 99..100, _] => {},
+ //~^ ERROR `..X` range patterns are not supported
+ //~| ERROR arbitrary expressions aren't allowed in patterns
+ //~| ERROR only char and numeric types are allowed in range patterns
+ //~| ERROR mismatched types
_ => {},
}
}
fn main() {
match 0 {
- (.. pat) => {} //~ ERROR expected one of `)` or `,`, found `pat`
+ (.. pat) => {}
+ //~^ ERROR `..X` range patterns are not supported
+ //~| ERROR arbitrary expressions aren't allowed in patterns
+ //~| ERROR cannot find value `pat` in this scope
+ //~| ERROR exclusive range pattern syntax is experimental
+ //~| ERROR only char and numeric types are allowed in range patterns
}
}
fn main() {
match (0, 1) {
- (pat ..) => {} //~ ERROR unexpected token: `)`
+ (pat ..) => {}
+ //~^ ERROR `X..` range patterns are not supported
+ //~| ERROR arbitrary expressions aren't allowed in patterns
+ //~| ERROR cannot find value `pat` in this scope
+ //~| ERROR exclusive range pattern syntax is experimental
+ //~| ERROR only char and numeric types are allowed in range patterns
}
}