use List<Ty<'tcx>>
for tuples
This commit is contained in:
parent
a9c1ab82f5
commit
1245131a11
53 changed files with 128 additions and 170 deletions
|
@ -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,
|
||||
|
|
|
@ -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) =>");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue