Skip to content

Commit 808e174

Browse files
Don't treat negative trait predicates as always knowable
1 parent 864bdf7 commit 808e174

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_trait_selection/src/traits/select

1 file changed

+1
-1
lines changed

compiler/rustc_trait_selection/src/traits/select/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
14871487
fn is_knowable<'o>(&mut self, stack: &TraitObligationStack<'o, 'tcx>) -> Result<(), Conflict> {
14881488
debug!("is_knowable(intercrate={:?})", self.is_intercrate());
14891489

1490-
if !self.is_intercrate() || stack.obligation.polarity() == ty::ImplPolarity::Negative {
1490+
if !self.is_intercrate() {
14911491
return Ok(());
14921492
}
14931493

0 commit comments

Comments
 (0)