about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-24 22:29:14 +0000
committerbors <bors@rust-lang.org>2022-02-24 22:29:14 +0000
commit4e82f35492ea5c78e19609bf4468f0a686d9a756 (patch)
tree23fbd4cd23c587684432375a288e303b80be8051 /compiler/rustc_codegen_ssa/src
parent4b043faba34ccc053a4d0110634c323f6c03765e (diff)
parent3bd163f4e8422db4c0de384b2b21bfaaecd2e5c1 (diff)
downloadrust-4e82f35492ea5c78e19609bf4468f0a686d9a756.tar.gz
rust-4e82f35492ea5c78e19609bf4468f0a686d9a756.zip
Auto merge of #94333 - Dylan-DPC:rollup-7yxtywp, r=Dylan-DPC
Rollup of 9 pull requests

Successful merges:

 - #91795 (resolve/metadata: Stop encoding macros as reexports)
 - #93714 (better ObligationCause for normalization errors in `can_type_implement_copy`)
 - #94175 (Improve `--check-cfg` implementation)
 - #94212 (Stop manually SIMDing in `swap_nonoverlapping`)
 - #94242 (properly handle fat pointers to uninhabitable types)
 - #94308 (Normalize main return type during mono item collection & codegen)
 - #94315 (update auto trait lint for `PhantomData`)
 - #94316 (Improve string literal unescaping)
 - #94327 (Avoid emitting full macro body into JSON errors)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/base.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs
index ed6c156547e..11f32d92e44 100644
--- a/compiler/rustc_codegen_ssa/src/base.rs
+++ b/compiler/rustc_codegen_ssa/src/base.rs
@@ -407,7 +407,10 @@ pub fn maybe_create_entry_wrapper<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
         // late-bound regions, since late-bound
         // regions must appear in the argument
         // listing.
-        let main_ret_ty = cx.tcx().erase_regions(main_ret_ty.no_bound_vars().unwrap());
+        let main_ret_ty = cx.tcx().normalize_erasing_regions(
+            ty::ParamEnv::reveal_all(),
+            main_ret_ty.no_bound_vars().unwrap(),
+        );
 
         let Some(llfn) = cx.declare_c_main(llfty) else {
             // FIXME: We should be smart and show a better diagnostic here.