about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2022-02-07 16:06:31 +0100
committerlcnr <rust@lcnr.de>2022-02-21 07:09:11 +0100
commit1245131a118ee08a38cfd3a90952a0168d65cae2 (patch)
treeec9618eef558e0a8f4c43e81fc3cb7bd07dbe928 /compiler/rustc_ty_utils
parenta9c1ab82f5f58a8459fc5f1f2d13021e80f23421 (diff)
downloadrust-1245131a118ee08a38cfd3a90952a0168d65cae2.tar.gz
rust-1245131a118ee08a38cfd3a90952a0168d65cae2.zip
use `List<Ty<'tcx>>` for tuples
Diffstat (limited to 'compiler/rustc_ty_utils')
-rw-r--r--compiler/rustc_ty_utils/src/representability.rs4
-rw-r--r--compiler/rustc_ty_utils/src/ty.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_ty_utils/src/representability.rs b/compiler/rustc_ty_utils/src/representability.rs
index b08f8f62308..11a57688580 100644
--- a/compiler/rustc_ty_utils/src/representability.rs
+++ b/compiler/rustc_ty_utils/src/representability.rs
@@ -70,9 +70,9 @@ fn are_inner_types_recursive<'tcx>(
 ) -> Representability {
     debug!("are_inner_types_recursive({:?}, {:?}, {:?})", ty, seen, shadow_seen);
     match ty.kind() {
-        ty::Tuple(..) => {
+        ty::Tuple(fields) => {
             // Find non representable
-            fold_repr(ty.tuple_fields().map(|ty| {
+            fold_repr(fields.iter().map(|ty| {
                 is_type_structurally_recursive(
                     tcx,
                     sp,
diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs
index 20ae986ffa4..e6ce3447548 100644
--- a/compiler/rustc_ty_utils/src/ty.rs
+++ b/compiler/rustc_ty_utils/src/ty.rs
@@ -24,7 +24,7 @@ fn sized_constraint_for_ty<'tcx>(
 
         Tuple(ref tys) => match tys.last() {
             None => vec![],
-            Some(ty) => sized_constraint_for_ty(tcx, adtdef, ty.expect_ty()),
+            Some(&ty) => sized_constraint_for_ty(tcx, adtdef, ty),
         },
 
         Adt(adt, substs) => {
@@ -461,9 +461,9 @@ pub fn conservative_is_privately_uninhabited_raw<'tcx>(
                 })
             })
         }
-        ty::Tuple(..) => {
+        ty::Tuple(fields) => {
             debug!("ty::Tuple(..) =>");
-            ty.tuple_fields().any(|ty| tcx.conservative_is_privately_uninhabited(param_env.and(ty)))
+            fields.iter().any(|ty| tcx.conservative_is_privately_uninhabited(param_env.and(ty)))
         }
         ty::Array(ty, len) => {
             debug!("ty::Array(ty, len) =>");