Use != Positive rather than == Negative
Feels more complete, and for ImplPolarity has the side-effect of making sure we also handle reservation impls correctly
This commit is contained in:
parent
4b87c0b9c9
commit
127e42d33b
6 changed files with 6 additions and 6 deletions
|
@ -270,7 +270,7 @@ impl<'tcx, O: Elaboratable<'tcx>> Elaborator<'tcx, O> {
|
|||
match bound_clause.skip_binder() {
|
||||
ty::ClauseKind::Trait(data) => {
|
||||
// Negative trait bounds do not imply any supertrait bounds
|
||||
if data.polarity == ty::PredicatePolarity::Negative {
|
||||
if data.polarity != ty::PredicatePolarity::Positive {
|
||||
return;
|
||||
}
|
||||
// Get predicates implied by the trait, or only super predicates if we only care about self predicates.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue