Skip to content

Commit

Permalink
Closure body was being built incorrectly on error...
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jan 14, 2024
1 parent 5876c8c commit c5cb87c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_mir_build/src/build/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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,
)
Expand Down

0 comments on commit c5cb87c

Please sign in to comment.