You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#![crate_type = "lib"]#![feature(filling_drop)]extern"C"{fn__rust_allocate(_:usize, _:usize) -> &'static muti8;fn__rust_deallocate(_:*muti8, _:usize, _:usize);}pubfnfoo(x:i32) -> i32{unsafe{let b = __rust_allocate(4,4)as*mut_as*muti32;*b = x;let r = *b;// Comment this check and watch the IR shrink.if b != std::mem::POST_DROP_USIZEas*muti32{__rust_deallocate(b as*muti8,4,4);}
r
}}
A complete implementation of #5016 should fix this, although I'm surprised there is a check at all here (run on playpen):
#![crate_type = "lib"]pubfnfoo(x:i32) -> i32{let b = Box::new(x);*b
}
Testcase by @tsion (run on playpen):
A complete implementation of #5016 should fix this, although I'm surprised there is a check at all here (run on playpen):
cc @alexcrichton @pnkfelix
The text was updated successfully, but these errors were encountered: