Rollup merge of #56364 - dlrobertson:fix_55903, r=oli-obk

Fix panic with outlives in existential type

Don't panic in determining the privacy of a type if a lifetime outlives
generic exists in an existential type.

r? @oli-obk

Fixes: #55903
This commit is contained in:
kennytm 2018-12-01 01:06:08 +08:00
commit 42bac05d72
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C

View File

@ -969,7 +969,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for TypePrivacyVisitor<'a, 'tcx> {
Some(poly_projection_predicate.skip_binder()
.projection_ty.trait_ref(self.tcx))
}
ty::Predicate::TypeOutlives(..) => None,
ty::Predicate::TypeOutlives(..) | ty::Predicate::RegionOutlives(..) => None,
_ => bug!("unexpected predicate: {:?}", predicate),
};
if let Some(trait_ref) = trait_ref {