]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/zero_sized_subslice_match.rs
slice_patterns: remove gates in tests
[rust.git] / src / test / ui / binding / zero_sized_subslice_match.rs
1 // run-pass
2
3 fn main() {
4     let x = [(), ()];
5
6     // The subslice used to go out of bounds for zero-sized array items, check that this doesn't
7     // happen anymore
8     match x {
9         [_, ref y @ ..] => assert_eq!(&x[1] as *const (), &y[0] as *const ())
10     }
11 }