mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
27 lines
466 B
Rust
27 lines
466 B
Rust
// check-pass
|
|
|
|
fn main() {
|
|
let s: &[bool] = &[true; 0];
|
|
let s0: &[bool; 0] = &[];
|
|
let s1: &[bool; 1] = &[false; 1];
|
|
let s2: &[bool; 2] = &[false; 2];
|
|
|
|
let [] = s0;
|
|
let [_] = s1;
|
|
let [_, _] = s2;
|
|
|
|
let [..] = s;
|
|
let [..] = s0;
|
|
let [..] = s1;
|
|
let [..] = s2;
|
|
|
|
let [_, ..] = s1;
|
|
let [.., _] = s1;
|
|
let [_, ..] = s2;
|
|
let [.., _] = s2;
|
|
|
|
let [_, _, ..] = s2;
|
|
let [_, .., _] = s2;
|
|
let [.., _, _] = s2;
|
|
}
|