summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.rs
blob: b39ae0333ad314d8d86b75e8979da729f5ad4fde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// compile-flags: -Ztrait-solver=next

// Coherence should handle overflow while normalizing for
// `trait_ref_is_knowable` correctly.

trait Overflow {
    type Assoc;
}
impl<T> Overflow for T {
    type Assoc = <T as Overflow>::Assoc;
}


trait Trait {}
impl<T: Copy> Trait for T {}
struct LocalTy;
impl Trait for <LocalTy as Overflow>::Assoc {}
//~^ ERROR conflicting implementations of trait `Trait` for type `<LocalTy as Overflow>::Assoc`

fn main() {}