Don't treat negative trait predicates as always knowable
This commit is contained in:
parent
864bdf7843
commit
808e174dfc
@ -1487,7 +1487,7 @@ fn filter_reservation_impls(
|
|||||||
fn is_knowable<'o>(&mut self, stack: &TraitObligationStack<'o, 'tcx>) -> Result<(), Conflict> {
|
fn is_knowable<'o>(&mut self, stack: &TraitObligationStack<'o, 'tcx>) -> Result<(), Conflict> {
|
||||||
debug!("is_knowable(intercrate={:?})", self.is_intercrate());
|
debug!("is_knowable(intercrate={:?})", self.is_intercrate());
|
||||||
|
|
||||||
if !self.is_intercrate() || stack.obligation.polarity() == ty::ImplPolarity::Negative {
|
if !self.is_intercrate() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user