1
Fork 0

use Instance::expect_resolve() instead of unwraping Instance::resolve()

This commit is contained in:
Ralf Jung 2024-03-10 11:49:27 +01:00
parent 094a6204f5
commit aa9145e6ea
6 changed files with 20 additions and 33 deletions

View file

@ -1339,14 +1339,12 @@ impl<'v> RootCollector<'_, 'v> {
main_ret_ty.no_bound_vars().unwrap(),
);
let start_instance = Instance::resolve(
let start_instance = Instance::expect_resolve(
self.tcx,
ty::ParamEnv::reveal_all(),
start_def_id,
self.tcx.mk_args(&[main_ret_ty.into()]),
)
.unwrap()
.unwrap();
);
self.output.push(create_fn_mono_item(self.tcx, start_instance, DUMMY_SP));
}