]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/init-large-type.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / init-large-type.rs
index a304fc9356b510fdf4f5fdec972f095aa8215e77..ce905572f2a8cee736a5e33f3e30514097e5bb50 100644 (file)
@@ -1,3 +1,4 @@
+// compile-flags: -O
 // run-pass
 
 #![allow(unused_must_use)]
 
 #![feature(intrinsics)]
 
-use std::thread;
-
-extern "rust-intrinsic" {
-    pub fn init<T>() -> T;
-}
+use std::{mem, thread};
 
 const SIZE: usize = 1024 * 1024;
 
 fn main() {
     // do the test in a new thread to avoid (spurious?) stack overflows
     thread::spawn(|| {
-        let _memory: [u8; SIZE] = unsafe { init() };
+        let _memory: [u8; SIZE] = unsafe { mem::zeroed() };
     }).join();
 }