Skip to content

Commit

Permalink
dont call mir.post_mono_checks in codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Sep 30, 2023
1 parent 809cd20 commit ffa2d3a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,6 @@ pub(crate) fn verify_func(
}

fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
if let Err(err) =
fx.mir.post_mono_checks(fx.tcx, ty::ParamEnv::reveal_all(), |c| Ok(fx.monomorphize(c)))
{
err.emit_err(fx.tcx);
fx.bcx.append_block_params_for_function_params(fx.block_map[START_BLOCK]);
fx.bcx.switch_to_block(fx.block_map[START_BLOCK]);
// compilation should have been aborted
fx.bcx.ins().trap(TrapCode::UnreachableCodeReached);
return;
}

let arg_uninhabited = fx
.mir
.args_iter()
Expand Down

0 comments on commit ffa2d3a

Please sign in to comment.