]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/upvar.rs
Rollup merge of #89793 - ibraheemdev:from_ptr_range, r=m-ou-se
[rust.git] / compiler / rustc_typeck / src / check / upvar.rs
index 73f7cafa1628cc3270966fb459424ef3b1ca2737..257846324b888307145e064e96a9a48f8a4b852f 100644 (file)
@@ -1448,7 +1448,7 @@ fn has_significant_drop_outside_of_captures(
                 )
             }
 
-            ty::Tuple(..) => {
+            ty::Tuple(fields) => {
                 // Only Field projections can be applied to a tuple.
                 assert!(
                     captured_by_move_projs.iter().all(|projs| matches!(
@@ -1457,7 +1457,7 @@ fn has_significant_drop_outside_of_captures(
                     ))
                 );
 
-                base_path_ty.tuple_fields().enumerate().any(|(i, element_ty)| {
+                fields.iter().enumerate().any(|(i, element_ty)| {
                     let paths_using_field = captured_by_move_projs
                         .iter()
                         .filter_map(|projs| {