Update tests wrt. recovery of range patterns.
This commit is contained in:
parent
2f55354759
commit
2411134c78
@ -2,7 +2,10 @@
|
||||
|
||||
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
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,11 @@
|
||||
|
||||
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
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,11 @@
|
||||
|
||||
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
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user