let expected_return_type = if tcx.lang_items().termination().is_some() {
// we take the return type of the given main function, the real check is done
// in `check_fn`
- actual.output().skip_binder()
+ actual.output()
} else {
// standard () main return type
- tcx.mk_unit()
+ ty::Binder::dummy(tcx.mk_unit())
};
- let se_ty = tcx.mk_fn_ptr(ty::Binder::bind(tcx.mk_fn_sig(
- iter::empty(),
- expected_return_type,
- false,
- hir::Unsafety::Normal,
- Abi::Rust,
- )));
+ let se_ty = tcx.mk_fn_ptr(expected_return_type.map_bound(|expected_return_type| {
+ tcx.mk_fn_sig(
+ iter::empty(),
+ expected_return_type,
+ false,
+ hir::Unsafety::Normal,
+ Abi::Rust,
+ )
+ }));
require_same_types(
tcx,