summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs
blob: 90de6b847d08c95d16ce1f4e39c7ac58293ec5a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// compile-flags: -Znext-solver
// check-pass

trait Id {
    type Assoc;
}
impl<T> Id for T {
    type Assoc = T;
}


// Coherence should be able to reason that `(): PartialEq<<T as Id>::Assoc>>`
// does not hold.
//
// See https://github.com/rust-lang/trait-system-refactor-initiative/issues/51
// for more details.
trait Trait {}
impl<T> Trait for T
where
    (): PartialEq<T> {}
struct LocalTy;
impl Trait for <LocalTy as Id>::Assoc {}

fn main() {}