slice_patterns: remove feature gate test
This commit is contained in:
parent
3ccb0f9b8f
commit
3e3cac010b
2 changed files with 0 additions and 74 deletions
|
@ -1,17 +0,0 @@
|
||||||
// Test that slice pattern syntax with `..` is gated by `slice_patterns` feature gate
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
let x = [1, 2, 3, 4, 5];
|
|
||||||
match x {
|
|
||||||
[1, 2, ..] => {} //~ ERROR subslice patterns are unstable
|
|
||||||
[1, .., 5] => {} //~ ERROR subslice patterns are unstable
|
|
||||||
[.., 4, 5] => {} //~ ERROR subslice patterns are unstable
|
|
||||||
}
|
|
||||||
|
|
||||||
let x = [ 1, 2, 3, 4, 5 ];
|
|
||||||
match x {
|
|
||||||
[ xs @ .., 4, 5 ] => {} //~ ERROR subslice patterns are unstable
|
|
||||||
[ 1, xs @ .., 5 ] => {} //~ ERROR subslice patterns are unstable
|
|
||||||
[ 1, 2, xs @ .. ] => {} //~ ERROR subslice patterns are unstable
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
error[E0658]: subslice patterns are unstable
|
|
||||||
--> $DIR/feature-gate-slice-patterns.rs:6:16
|
|
||||||
|
|
|
||||||
LL | [1, 2, ..] => {}
|
|
||||||
| ^^
|
|
||||||
|
|
|
||||||
= note: for more information, see https://github.com/rust-lang/rust/issues/62254
|
|
||||||
= help: add `#![feature(slice_patterns)]` to the crate attributes to enable
|
|
||||||
|
|
||||||
error[E0658]: subslice patterns are unstable
|
|
||||||
--> $DIR/feature-gate-slice-patterns.rs:7:13
|
|
||||||
|
|
|
||||||
LL | [1, .., 5] => {}
|
|
||||||
| ^^
|
|
||||||
|
|
|
||||||
= note: for more information, see https://github.com/rust-lang/rust/issues/62254
|
|
||||||
= help: add `#![feature(slice_patterns)]` to the crate attributes to enable
|
|
||||||
|
|
||||||
error[E0658]: subslice patterns are unstable
|
|
||||||
--> $DIR/feature-gate-slice-patterns.rs:8:10
|
|
||||||
|
|
|
||||||
LL | [.., 4, 5] => {}
|
|
||||||
| ^^
|
|
||||||
|
|
|
||||||
= note: for more information, see https://github.com/rust-lang/rust/issues/62254
|
|
||||||
= help: add `#![feature(slice_patterns)]` to the crate attributes to enable
|
|
||||||
|
|
||||||
error[E0658]: subslice patterns are unstable
|
|
||||||
--> $DIR/feature-gate-slice-patterns.rs:13:11
|
|
||||||
|
|
|
||||||
LL | [ xs @ .., 4, 5 ] => {}
|
|
||||||
| ^^^^^^^
|
|
||||||
|
|
|
||||||
= note: for more information, see https://github.com/rust-lang/rust/issues/62254
|
|
||||||
= help: add `#![feature(slice_patterns)]` to the crate attributes to enable
|
|
||||||
|
|
||||||
error[E0658]: subslice patterns are unstable
|
|
||||||
--> $DIR/feature-gate-slice-patterns.rs:14:14
|
|
||||||
|
|
|
||||||
LL | [ 1, xs @ .., 5 ] => {}
|
|
||||||
| ^^^^^^^
|
|
||||||
|
|
|
||||||
= note: for more information, see https://github.com/rust-lang/rust/issues/62254
|
|
||||||
= help: add `#![feature(slice_patterns)]` to the crate attributes to enable
|
|
||||||
|
|
||||||
error[E0658]: subslice patterns are unstable
|
|
||||||
--> $DIR/feature-gate-slice-patterns.rs:15:17
|
|
||||||
|
|
|
||||||
LL | [ 1, 2, xs @ .. ] => {}
|
|
||||||
| ^^^^^^^
|
|
||||||
|
|
|
||||||
= note: for more information, see https://github.com/rust-lang/rust/issues/62254
|
|
||||||
= help: add `#![feature(slice_patterns)]` to the crate attributes to enable
|
|
||||||
|
|
||||||
error: aborting due to 6 previous errors
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0658`.
|
|
Loading…
Add table
Reference in a new issue