diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-02-23 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-02-23 22:33:50 +0100 |
| commit | f047af24b3b90f19b89fac80822acd69613b89ec (patch) | |
| tree | 723e234654af638ef0c109257e1e847835015d31 /compiler/rustc_codegen_cranelift | |
| parent | 532d3cda90b8a729cd982548649d32803d265052 (diff) | |
| download | rust-f047af24b3b90f19b89fac80822acd69613b89ec.tar.gz rust-f047af24b3b90f19b89fac80822acd69613b89ec.zip | |
Normalize main return type during mono item collection & codegen
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/main_shim.rs | 5 |
1 files changed, 4 insertions, 1 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