]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/zero_sized_subslice_match.rs
Auto merge of #35856 - phimuemue:master, r=brson
[rust.git] / src / test / run-pass / zero_sized_subslice_match.rs
index 697508ae4888916085dc2067a8e0cf309b4e7453..d399ef72976f1ae818c3f45a8980069970ada7ab 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
 #![feature(slice_patterns)]
 
 fn main() {
@@ -17,6 +16,6 @@ fn main() {
     // The subslice used to go out of bounds for zero-sized array items, check that this doesn't
     // happen anymore
     match x {
-        [_, y..] => assert_eq!(&x[1] as *const (), &y[0] as *const ())
+        [_, ref y..] => assert_eq!(&x[1] as *const (), &y[0] as *const ())
     }
 }