about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs
index 77763188054..94c4bc55f79 100644
--- a/compiler/rustc_trait_selection/src/traits/select/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs
@@ -1129,8 +1129,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
         candidates.retain(|candidate| {
             if let ImplCandidate(def_id) = candidate {
                 ty::ImplPolarity::Reservation == tcx.impl_polarity(*def_id)
-                    || !self.allow_negative_impls
-                        && stack.obligation.polarity() == tcx.impl_polarity(*def_id)
+                    || stack.obligation.polarity() == tcx.impl_polarity(*def_id)
+                    || self.allow_negative_impls
             } else {
                 true
             }