1
Fork 0

Rollup merge of #95039 - spastorino:overlap-super-predicates, r=nikomatsakis

Make negative coherence work when there's impl negative on super predicates

r? `@nikomatsakis`
This commit is contained in:
Matthias Krüger 2022-03-18 05:21:55 +01:00 committed by GitHub
commit 588d389dc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 96 additions and 44 deletions

View file

@ -748,6 +748,13 @@ pub struct TraitPredicate<'tcx> {
pub constness: BoundConstness,
/// If polarity is Positive: we are proving that the trait is implemented.
///
/// If polarity is Negative: we are proving that a negative impl of this trait
/// exists. (Note that coherence also checks whether negative impls of supertraits
/// exist via a series of predicates.)
///
/// If polarity is Reserved: that's a bug.
pub polarity: ImplPolarity,
}