summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.rs
blob: 4717aa80499a46e915938f928c553b2b582ac4fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// compile-flags: -Znext-solver

// check that a `alias-eq(<?a as TraitB>::Assoc, <?b as TraitB>::Assoc)` goal fails
// during coherence. We must not incorrectly constrain `?a` and `?b` to be
// equal.

trait TraitB {
    type Assoc;
}

trait Overlaps<T> {}

impl<T: TraitB> Overlaps<Box<T>> for <T as TraitB>::Assoc {}
impl<U: TraitB> Overlaps<U> for <U as TraitB>::Assoc {}
//~^ ERROR conflicting implementations of trait

fn main() {}