2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2015-03-26 18:34:27 -07:00
|
|
|
|
2015-01-13 22:30:49 +01:00
|
|
|
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 {
|
2019-07-08 01:47:46 +02:00
|
|
|
[_, ref y @ ..] => assert_eq!(&x[1] as *const (), &y[0] as *const ())
|
2015-01-13 22:30:49 +01:00
|
|
|
}
|
|
|
|
|
}
|