Closure body was being built incorrectly on error...

This commit is contained in:
Michael Goulet 2024-01-14 19:59:10 +00:00
parent 5876c8cdfd
commit c5cb87cf0c

View File

@ -1,5 +1,6 @@
use crate::build::expr::as_place::PlaceBuilder;
use crate::build::scope::DropKind;
use itertools::Itertools;
use rustc_apfloat::ieee::{Double, Single};
use rustc_apfloat::Float;
use rustc_ast::attr;
@ -654,7 +655,7 @@ fn construct_error(tcx: TyCtxt<'_>, def_id: LocalDefId, guar: ErrorGuaranteed) -
ty::ClosureKind::FnOnce => closure_ty,
};
(
[self_ty].into_iter().chain(sig.inputs().to_vec()).collect(),
[self_ty].into_iter().chain(sig.inputs()[0].tuple_fields()).collect(),
sig.output(),
None,
)