]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass-valgrind/coerce-match.rs
Auto merge of #98655 - nnethercote:dont-derive-PartialEq-ne, r=dtolnay
[rust.git] / src / test / run-pass-valgrind / coerce-match.rs
index a4ba5427d4b04d7b5a7cbec44db91bca19509000..5b78f1ec77c54d514c37b18ef180368715e4351d 100644 (file)
@@ -2,15 +2,18 @@
 
 // pretty-expanded FIXME #23616
 
-#![feature(box_syntax)]
-
 pub fn main() {
-    let _: Box<[isize]> =
-        if true { let b: Box<_> = box [1, 2, 3]; b } else { let b: Box<_> = box [1]; b };
+    let _: Box<[isize]> = if true {
+        let b: Box<_> = Box::new([1, 2, 3]);
+        b
+    } else {
+        let b: Box<_> = Box::new([1]);
+        b
+    };
 
     let _: Box<[isize]> = match true {
-        true => { let b: Box<_> = box [1, 2, 3]; b }
-        false => { let b: Box<_> = box [1]; b }
+        true => { let b: Box<_> = Box::new([1, 2, 3]); b }
+        false => { let b: Box<_> = Box::new([1]); b }
     };
 
     // Check we don't get over-keen at propagating coercions in the case of casts.