mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-01 08:53:29 +00:00
12 lines
268 B
Rust
12 lines
268 B
Rust
//@ run-pass
|
|
|
|
fn main() {
|
|
let x = [(), ()];
|
|
|
|
// The subslice used to go out of bounds for zero-sized array items, check that this doesn't
|
|
// happen anymore
|
|
match x {
|
|
[_, ref y @ ..] => assert_eq!(&x[1] as *const (), &y[0] as *const ())
|
|
}
|
|
}
|