diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs index 595337b2e91d..63aacbe2e856 100644 --- a/compiler/rustc_trait_selection/src/traits/coherence.rs +++ b/compiler/rustc_trait_selection/src/traits/coherence.rs @@ -366,6 +366,7 @@ fn negative_impl_exists<'cx, 'tcx>( return true; } + // FIXME we should implement an `assemble_neg_candidates` fn for o in util::elaborate_predicates(infcx.tcx, iter::once(o.predicate)) { if resolve_negative_obligation(infcx, param_env, region_context, &o) { return true; diff --git a/src/test/ui/coherence/coherence-overlap-negate-alias-strict.rs b/src/test/ui/coherence/coherence-overlap-negate-alias-strict.rs index c240a1839827..48dffc921a31 100644 --- a/src/test/ui/coherence/coherence-overlap-negate-alias-strict.rs +++ b/src/test/ui/coherence/coherence-overlap-negate-alias-strict.rs @@ -1,3 +1,5 @@ +// check-pass + #![feature(negative_impls)] #![feature(rustc_attrs)] #![feature(trait_alias)] @@ -13,7 +15,5 @@ impl !A for u32 {} trait C {} impl C for T {} impl C for u32 {} -//~^ ERROR: conflicting implementations of trait `C` for type `u32` [E0119] -// FIXME this should work, we should implement an `assemble_neg_candidates` fn fn main() {} diff --git a/src/test/ui/coherence/coherence-overlap-negate-alias-strict.stderr b/src/test/ui/coherence/coherence-overlap-negate-alias-strict.stderr deleted file mode 100644 index 30d837a5c501..000000000000 --- a/src/test/ui/coherence/coherence-overlap-negate-alias-strict.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0119]: conflicting implementations of trait `C` for type `u32` - --> $DIR/coherence-overlap-negate-alias-strict.rs:15:1 - | -LL | impl C for T {} - | ------------------- first implementation here -LL | impl C for u32 {} - | ^^^^^^^^^^^^^^ conflicting implementation for `u32` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`.