2024-09-11 16:57:04 -05:00
|
|
|
//@ compile-flags: -Znext-solver=coherence
|
2024-02-16 11:56:15 -06:00
|
|
|
//@ check-pass
|
2024-09-11 16:57:04 -05:00
|
|
|
|
2024-02-16 11:56:15 -06:00
|
|
|
trait Mirror {
|
|
|
|
type Assoc;
|
|
|
|
}
|
|
|
|
impl<T> Mirror for T {
|
|
|
|
type Assoc = T;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Foo {}
|
|
|
|
trait Bar {}
|
|
|
|
|
|
|
|
// self type starts out as `?0` but is constrained to `()`
|
|
|
|
// due to the where clause below. Because `(): Bar` does not
|
|
|
|
// hold in intercrate mode, we can prove the impls disjoint.
|
|
|
|
impl<T> Foo for T where (): Mirror<Assoc = T> {}
|
|
|
|
impl<T> Foo for T where T: Bar {}
|
|
|
|
|
|
|
|
fn main() {}
|