Skip to content

Commit c5cb87c

Browse files
Closure body was being built incorrectly on error...
1 parent 5876c8c commit c5cb87c

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_mir_build/src/build

1 file changed

+2
-1
lines changed

compiler/rustc_mir_build/src/build/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::build::expr::as_place::PlaceBuilder;
22
use crate::build::scope::DropKind;
3+
use itertools::Itertools;
34
use rustc_apfloat::ieee::{Double, Single};
45
use rustc_apfloat::Float;
56
use rustc_ast::attr;
@@ -654,7 +655,7 @@ fn construct_error(tcx: TyCtxt<'_>, def_id: LocalDefId, guar: ErrorGuaranteed) -
654655
ty::ClosureKind::FnOnce => closure_ty,
655656
};
656657
(
657-
[self_ty].into_iter().chain(sig.inputs().to_vec()).collect(),
658+
[self_ty].into_iter().chain(sig.inputs()[0].tuple_fields()).collect(),
658659
sig.output(),
659660
None,
660661
)

0 commit comments

Comments
 (0)