Do not normalize closure signature when building FnOnce shim

This commit is contained in:
Michael Goulet 2024-01-19 20:04:14 +00:00
parent 3066253050
commit f700ee4e70
7 changed files with 20 additions and 18 deletions

View file

@ -783,8 +783,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
def_id,
args,
ty::ClosureKind::FnOnce,
)
.expect("failed to normalize and resolve closure during codegen");
);
if should_codegen_locally(self.tcx, &instance) {
self.output.push(create_fn_mono_item(self.tcx, instance, span));
}