blob: b472499cb0bf710e2543d75ebbed42fd369e0636 [file] [log] [blame]
//@ compile-flags: -Znext-solver=coherence
// A regression test for #124791. Computing ambiguity causes
// for the overlap of the `ToString` impls caused an ICE.
#![crate_type = "lib"]
trait ToOwned {
type Owned;
}
impl<T> ToOwned for T {
type Owned = u8;
}
impl ToOwned for str {
type Owned = i8;
}
trait Overlap {}
impl<T: ToOwned<Owned = i8> + ?Sized> Overlap for T {}
impl Overlap for str {}
//~^ ERROR conflicting implementations of trait `Overlap`