diff options
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/main_shim.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/base.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/main_shim.rs b/compiler/rustc_codegen_cranelift/src/main_shim.rs index 9ce727279c2..2f71a70a449 100644 --- a/compiler/rustc_codegen_cranelift/src/main_shim.rs +++ b/compiler/rustc_codegen_cranelift/src/main_shim.rs @@ -51,7 +51,10 @@ pub(crate) fn maybe_create_entry_wrapper( // late-bound regions, since late-bound // regions must appear in the argument // listing. - let main_ret_ty = tcx.erase_regions(main_ret_ty.no_bound_vars().unwrap()); + let main_ret_ty = tcx.normalize_erasing_regions( + ty::ParamEnv::reveal_all(), + main_ret_ty.no_bound_vars().unwrap(), + ); let cmain_sig = Signature { params: vec