]> git.lizzy.rs Git - rust.git/commitdiff
Properly propagate block changes while translating drop glue
authorBjörn Steinbrink <bsteinbr@gmail.com>
Mon, 2 Mar 2015 11:11:46 +0000 (12:11 +0100)
committerManish Goregaokar <manishsmail@gmail.com>
Mon, 2 Mar 2015 16:05:40 +0000 (21:35 +0530)
src/librustc_trans/trans/glue.rs

index 9491c8377a655fdbe10eee9e63cc2200f29092f2..1151b11d21f35ce4faebacb7c8b606b7c0062c25 100644 (file)
@@ -313,8 +313,7 @@ fn trans_struct_drop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                                      ty::mk_nil(bcx.tcx()));
         let (_, variant_cx) = invoke(variant_cx, dtor_addr, &args[..], dtor_ty, DebugLoc::None);
 
-        variant_cx.fcx.pop_and_trans_custom_cleanup_scope(variant_cx, field_scope);
-        variant_cx
+        variant_cx.fcx.pop_and_trans_custom_cleanup_scope(variant_cx, field_scope)
     })
 }