rust/tests/pass/issues/issue-17877.rs

18 lines
301 B
Rust
Raw Normal View History

2016-09-28 18:22:09 +02:00
fn main() {
assert_eq!(
match [0u8; 16 * 1024] {
_ => 42_usize,
},
2022-06-20 16:08:00 -07:00
42_usize,
);
2016-09-28 18:22:09 +02:00
assert_eq!(
match [0u8; 16 * 1024] {
[1, ..] => 0_usize,
[0, ..] => 1_usize,
_ => 2_usize,
},
2022-06-20 16:08:00 -07:00
1_usize,
);
2016-09-28 18:22:09 +02:00
}