use List<Ty<'tcx>> for tuples

This commit is contained in:
lcnr 2022-02-07 16:06:31 +01:00
parent a9c1ab82f5
commit 1245131a11
53 changed files with 128 additions and 170 deletions

View file

@ -2298,7 +2298,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
// Closure arguments are wrapped in a tuple, so we need to get the first
// from that.
if let ty::Tuple(elems) = argument_ty.kind() {
let argument_ty = elems.first()?.expect_ty();
let &argument_ty = elems.first()?;
if let ty::Ref(_, _, _) = argument_ty.kind() {
return Some(AnnotatedBorrowFnSignature::Closure {
argument_ty,