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.
This commit is contained in:
Dan Robertson 2018-11-30 02:04:10 +00:00
parent 400c2bc5ed
commit a0fec9488e
No known key found for this signature in database
GPG Key ID: 45C4A652C47E42A5

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 {