rust/tests/ui/traits/next-solver/diagnostics/ambiguous-fail.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
357 B
Rust
Raw Normal View History

//@ compile-flags: -Znext-solver
trait Trait {
type Assoc;
}
struct W<T>(*mut T);
impl<T> Trait for W<W<T>>
where
W<T>: Trait,
{
type Assoc = ();
}
trait NoOverlap {}
impl<T: Trait> NoOverlap for T {}
impl<T: Trait<Assoc = u32>> NoOverlap for W<T> {}
//~^ ERROR conflicting implementations of trait `NoOverlap` for type `W<_>`
fn main() {}