Auto merge of #81327 - RalfJung:codegen-no-const-fail, r=oli-obk

codegen: assume constants cannot fail to evaluate

https://github.com/rust-lang/rust/pull/80579 landed, so we can finally remove this old hack from codegen and instead assume that consts never fail to evaluate. :)

r? `@oli-obk`
This commit is contained in:
bors 2021-01-31 07:03:09 +00:00
commit 9b32429822
4 changed files with 21 additions and 21 deletions

View file

@ -626,6 +626,11 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
total_codegen_time += start_time.elapsed();
module
};
// This will unwind if there are errors, which triggers our `AbortCodegenOnDrop`
// guard. Unfortunately, just skipping the `submit_codegened_module_to_llvm` makes
// compilation hang on post-monomorphization errors.
tcx.sess.abort_if_errors();
submit_codegened_module_to_llvm(
&backend,
&ongoing_codegen.coordinator_send,