This test now works
This commit is contained in:
parent
61a05ef8d6
commit
91846fe12a
3 changed files with 3 additions and 13 deletions
|
@ -366,6 +366,7 @@ fn negative_impl_exists<'cx, 'tcx>(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME we should implement an `assemble_neg_candidates` fn
|
||||||
for o in util::elaborate_predicates(infcx.tcx, iter::once(o.predicate)) {
|
for o in util::elaborate_predicates(infcx.tcx, iter::once(o.predicate)) {
|
||||||
if resolve_negative_obligation(infcx, param_env, region_context, &o) {
|
if resolve_negative_obligation(infcx, param_env, region_context, &o) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// check-pass
|
||||||
|
|
||||||
#![feature(negative_impls)]
|
#![feature(negative_impls)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![feature(trait_alias)]
|
#![feature(trait_alias)]
|
||||||
|
@ -13,7 +15,5 @@ impl !A for u32 {}
|
||||||
trait C {}
|
trait C {}
|
||||||
impl<T: AB> C for T {}
|
impl<T: AB> C for T {}
|
||||||
impl C for u32 {}
|
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() {}
|
fn main() {}
|
||||||
|
|
|
@ -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<T: AB> 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`.
|
|
Loading…
Add table
Add a link
Reference in a new issue