diff --git a/src/librustc_trans/mir/block.rs b/src/librustc_trans/mir/block.rs index 9e2d947c5e563..ca0edc5e056a0 100644 --- a/src/librustc_trans/mir/block.rs +++ b/src/librustc_trans/mir/block.rs @@ -115,6 +115,9 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> { if let Some(cleanup_pad) = cleanup_pad { bcx.cleanup_ret(cleanup_pad, None); } else { + let llpersonality = bcx.fcx.eh_personality(); + bcx.set_personality_fn(llpersonality); + let ps = self.get_personality_slot(&bcx); let lp = bcx.load(ps); bcx.with_block(|bcx| {