1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
//@ check-pass
// Check that negative impls for traits with associated types
// do not result in an ICE when trying to normalize.
#![feature(negative_impls)]
trait Trait {
type Assoc;
}
struct Local<T>(T);
impl !Trait for Local<u32> {}
impl Trait for Local<i32> {
type Assoc = i32;
}
trait NoOverlap {}
impl<T: Trait<Assoc = u32>> NoOverlap for T {}
impl<T> NoOverlap for Local<T> {}
fn main() {}
|