ty::Str | ty::Slice(_) | ty::Dynamic(..) | ty::Foreign(..) => None,
ty::Tuple(tys) => Where(
- obligation
- .predicate
- .rebind(tys.last().into_iter().map(|k| k.expect_ty()).collect()),
+ obligation.predicate.rebind(tys.last().map_or_else(Vec::new, |&last| vec![last])),
),
ty::Adt(def, substs) => {
ty::Tuple(tys) => {
// (*) binder moved here
- Where(obligation.predicate.rebind(tys.iter().map(|k| k.expect_ty()).collect()))
+ Where(obligation.predicate.rebind(tys.iter().collect()))
}
ty::Closure(_, substs) => {
ty::Tuple(ref tys) => {
// (T1, ..., Tn) -- meets any bound that all of T1...Tn meet
- t.rebind(tys.iter().map(|k| k.expect_ty()).collect())
+ t.rebind(tys.iter().collect())
}
ty::Closure(_, ref substs) => {