We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 460e664 commit 02a141aCopy full SHA for 02a141a
src/librustc_trans/trans/mir/lvalue.rs
@@ -51,7 +51,9 @@ impl<'tcx> LvalueRef<'tcx> {
51
{
52
assert!(!ty.has_erasable_regions());
53
let lltemp = bcx.with_block(|bcx| base::alloc_ty(bcx, ty, name));
54
- drop::drop_fill(bcx, lltemp, ty);
+ if bcx.fcx().type_needs_drop(ty) {
55
+ drop::drop_fill(bcx, lltemp, ty);
56
+ }
57
LvalueRef::new_sized(lltemp, LvalueTy::from_ty(ty))
58
}
59
0 commit comments