about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2022-02-02 14:32:21 -0300
committerSantiago Pastorino <spastorino@gmail.com>2022-02-14 12:56:27 -0300
commit4e8392459565f245a33b56916e570957dc3d1774 (patch)
tree0072655bef1294dcfbb6538ff9b39f37ecff1914
parentb321742c6c27494897a88cd5ac17ac20aa3469a1 (diff)
downloadrust-4e8392459565f245a33b56916e570957dc3d1774.tar.gz
rust-4e8392459565f245a33b56916e570957dc3d1774.zip
Remove extra negative_impl_exists check
-rw-r--r--compiler/rustc_trait_selection/src/traits/coherence.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs
index 21775a5c49f..89909914bc2 100644
--- a/compiler/rustc_trait_selection/src/traits/coherence.rs
+++ b/compiler/rustc_trait_selection/src/traits/coherence.rs
@@ -279,9 +279,7 @@ fn implicit_negative<'cx, 'tcx>(
             predicate: p,
         })
         .chain(obligations)
-        .find(|o| {
-            loose_check(selcx, o) || tcx.features().negative_impls && negative_impl_exists(selcx, o)
-        });
+        .find(|o| loose_check(selcx, o));
     // FIXME: the call to `selcx.predicate_may_hold_fatal` above should be ported
     // to the canonical trait query form, `infcx.predicate_may_hold`, once
     // the new system supports intercrate mode (which coherence needs).