Fixes after rebase

This commit is contained in:
Andrew Cann 2018-03-14 12:36:58 +08:00
parent 81ae93e339
commit b1526ca384
4 changed files with 3 additions and 52 deletions

View file

@ -609,12 +609,6 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for Canonicalizer<'cx, 'gcx, 'tcx>
bug!("encountered a canonical type during canonicalization")
}
// Replace a `()` that "would've fallen back" to `!` with just `()`.
ty::TyTuple(ref tys, true) => {
assert!(tys.is_empty());
self.tcx().mk_nil()
}
ty::TyClosure(..)
| ty::TyGenerator(..)
| ty::TyGeneratorWitness(..)
@ -634,7 +628,7 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for Canonicalizer<'cx, 'gcx, 'tcx>
| ty::TyFnPtr(_)
| ty::TyDynamic(..)
| ty::TyNever
| ty::TyTuple(_, false)
| ty::TyTuple(..)
| ty::TyProjection(..)
| ty::TyForeign(..)
| ty::TyParam(..)

View file

@ -236,7 +236,7 @@ fn trivial_dropck_outlives<'cx, 'tcx>(tcx: TyCtxt<'cx, '_, 'tcx>, ty: Ty<'tcx>)
// (T1..Tn) and closures have same properties as T1..Tn --
// check if *any* of those are trivial.
ty::TyTuple(ref tys, _) => tys.iter().cloned().all(|t| trivial_dropck_outlives(tcx, t)),
ty::TyTuple(ref tys) => tys.iter().cloned().all(|t| trivial_dropck_outlives(tcx, t)),
ty::TyClosure(def_id, ref substs) => substs
.upvar_tys(def_id, tcx)
.all(|t| trivial_dropck_outlives(tcx, t)),