Skip to content

Commit a0fec94

Browse files
committed
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.
1 parent 400c2bc commit a0fec94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/librustc_privacy/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for TypePrivacyVisitor<'a, 'tcx> {
969969
Some(poly_projection_predicate.skip_binder()
970970
.projection_ty.trait_ref(self.tcx))
971971
}
972-
ty::Predicate::TypeOutlives(..) => None,
972+
ty::Predicate::TypeOutlives(..) | ty::Predicate::RegionOutlives(..) => None,
973973
_ => bug!("unexpected predicate: {:?}", predicate),
974974
};
975975
if let Some(trait_ref) = trait_ref {

0 commit comments

Comments
 (0)