Skip to content

Commit

Permalink
Rollup merge of rust-lang#56364 - dlrobertson:fix_55903, r=oli-obk
Browse files Browse the repository at this point in the history
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: rust-lang#55903
  • Loading branch information
kennytm committed Nov 30, 2018
2 parents ddc7ef2 + a0fec94 commit 42bac05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_privacy/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 42bac05

Please sign in to comment.