]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/builtin.rs
Rollup merge of #94128 - mqy:master, r=Dylan-DPC
[rust.git] / compiler / rustc_lint / src / builtin.rs
index a397db7f32921d733a573af5d95d0ab2f85f9982..30b5f9b34d099ac8bad304c2b0418501c8f28455 100644 (file)
@@ -2621,7 +2621,7 @@ fn ty_find_init_error<'tcx>(
                 }
                 Tuple(..) => {
                     // Proceed recursively, check all fields.
-                    ty.tuple_fields().find_map(|field| ty_find_init_error(tcx, field, init))
+                    ty.tuple_fields().iter().find_map(|field| ty_find_init_error(tcx, field, init))
                 }
                 // Conservative fallback.
                 _ => None,
@@ -2634,7 +2634,7 @@ fn ty_find_init_error<'tcx>(
             // We are extremely conservative with what we warn about.
             let conjured_ty = cx.typeck_results().expr_ty(expr);
             if let Some((msg, span)) =
-                with_no_trimmed_paths(|| ty_find_init_error(cx.tcx, conjured_ty, init))
+                with_no_trimmed_paths!(ty_find_init_error(cx.tcx, conjured_ty, init))
             {
                 cx.struct_span_lint(INVALID_VALUE, expr.span, |lint| {
                     let mut err = lint.build(&format!(
@@ -2934,7 +2934,7 @@ fn structurally_same_type_impl<'tcx>(
                                 )
                         }
                         (Tuple(a_substs), Tuple(b_substs)) => {
-                            a_substs.types().eq_by(b_substs.types(), |a_ty, b_ty| {
+                            a_substs.iter().eq_by(b_substs.iter(), |a_ty, b_ty| {
                                 structurally_same_type_impl(seen_types, cx, a_ty, b_ty, ckind)
                             })
                         }