Skip to content

Commit 69bd532

Browse files
committed
Normalize main return type during mono item collection & codegen
1 parent b5cbb87 commit 69bd532

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main_shim.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ pub(crate) fn maybe_create_entry_wrapper(
5151
// late-bound regions, since late-bound
5252
// regions must appear in the argument
5353
// listing.
54-
let main_ret_ty = tcx.erase_regions(main_ret_ty.no_bound_vars().unwrap());
54+
let main_ret_ty = tcx.normalize_erasing_regions(
55+
ty::ParamEnv::reveal_all(),
56+
main_ret_ty.no_bound_vars().unwrap(),
57+
);
5558

5659
let cmain_sig = Signature {
5760
params: vec![

0 commit comments

Comments
 (0)