]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/subslice-only-once-semantic-restriction.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / array-slice-vec / subslice-only-once-semantic-restriction.rs
1 fn main() {
2     let a: &[u8] = &[];
3     match a {
4         [1, tail @ .., tail @ ..] => {},
5         //~^ ERROR identifier `tail` is bound more than once in the same pattern
6         //~| ERROR `..` can only be used once per slice pattern
7         _ => ()
8     }
9 }
10
11 const RECOVERY_WITNESS: () = 0; //~ ERROR mismatched types