about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2023-10-06 16:37:46 -0700
committerGitHub <noreply@github.com>2023-10-06 16:37:46 -0700
commit6d1c3a40cb4ce7b455e44834f79c5ecf39cd5021 (patch)
treeeab08be69d6bc410f9d64083b1fe394879d884bd /compiler/rustc_codegen_cranelift
parent960754090acc9cdd2a5a57586f244c0fc712d26c (diff)
parentfa248cd9e6927dd6981078963aa47feb941a0d10 (diff)
downloadrust-6d1c3a40cb4ce7b455e44834f79c5ecf39cd5021.tar.gz
rust-6d1c3a40cb4ce7b455e44834f79c5ecf39cd5021.zip
Rollup merge of #116277 - RalfJung:post-mono, r=oli-obk
dont call mir.post_mono_checks in codegen

It seems like all tests are still passing when I remove this... let's see what CI says.
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
-rw-r--r--compiler/rustc_codegen_cranelift/src/base.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs
index 0a451dad9d2..0c0a1e80a41 100644
--- a/compiler/rustc_codegen_cranelift/src/base.rs
+++ b/compiler/rustc_codegen_cranelift/src/base.rs
@@ -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()