slice_patterns: remove gates in tests

This commit is contained in:
Mazdak Farrokhzad 2019-12-30 01:23:42 +01:00
parent 3e3cac010b
commit a1eadca88f
116 changed files with 349 additions and 490 deletions

View file

@ -3,8 +3,6 @@ fn main() {
match a {
[1, tail @ .., tail @ ..] => {},
//~^ ERROR identifier `tail` is bound more than once in the same pattern
//~| ERROR subslice patterns are unstable
//~| ERROR subslice patterns are unstable
//~| ERROR `..` can only be used once per slice pattern
_ => ()
}

View file

@ -4,24 +4,6 @@ error[E0416]: identifier `tail` is bound more than once in the same pattern
LL | [1, tail @ .., tail @ ..] => {},
| ^^^^ used in a pattern more than once
error[E0658]: subslice patterns are unstable
--> $DIR/match-vec-invalid.rs:4:13
|
LL | [1, tail @ .., tail @ ..] => {},
| ^^^^^^^^^
|
= 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/match-vec-invalid.rs:4:24
|
LL | [1, tail @ .., tail @ ..] => {},
| ^^^^^^^^^
|
= 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: `..` can only be used once per slice pattern
--> $DIR/match-vec-invalid.rs:4:31
|
@ -31,12 +13,12 @@ LL | [1, tail @ .., tail @ ..] => {},
| previously used here
error[E0308]: mismatched types
--> $DIR/match-vec-invalid.rs:13:30
--> $DIR/match-vec-invalid.rs:11:30
|
LL | const RECOVERY_WITNESS: () = 0;
| ^ expected `()`, found integer
error: aborting due to 5 previous errors
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0308, E0416, E0658.
Some errors have detailed explanations: E0308, E0416.
For more information about an error, try `rustc --explain E0308`.

View file

@ -4,7 +4,6 @@ fn main() {
let Test(&desc[..]) = x;
//~^ ERROR: expected one of `)`, `,`, `@`, or `|`, found `[`
//~^^ ERROR subslice patterns are unstable
}
const RECOVERY_WITNESS: () = 0; //~ ERROR mismatched types

View file

@ -7,22 +7,12 @@ LL | let Test(&desc[..]) = x;
| expected one of `)`, `,`, `@`, or `|`
| help: missing `,`
error[E0658]: subslice patterns are unstable
--> $DIR/pat-lt-bracket-6.rs:5:20
|
LL | let Test(&desc[..]) = x;
| ^^
|
= 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[E0308]: mismatched types
--> $DIR/pat-lt-bracket-6.rs:10:30
--> $DIR/pat-lt-bracket-6.rs:9:30
|
LL | const RECOVERY_WITNESS: () = 0;
| ^ expected `()`, found integer
error: aborting due to 3 previous errors
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.
For more information about this error, try `rustc --explain E0308`.