mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
This test now works
This commit is contained in:
parent
61a05ef8d6
commit
91846fe12a
@ -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;
|
||||
|
@ -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<T: AB> 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() {}
|
||||
|
@ -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…
Reference in New Issue
Block a user