about summary refs log tree commit diff
path: root/tests/ui/specialization/coherence/default-impl-normalization-ambig-2.rs
blob: 1691530fa0a53a73a90c3922516dc4f487cee838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// regression test for #118987
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete

trait Assoc {
    type Output;
}

default impl<T: Clone> Assoc for T {
    type Output = bool;
}

impl Assoc for u8 {}

trait Foo {}

impl Foo for <u8 as Assoc>::Output {}
impl Foo for <u16 as Assoc>::Output {}
//~^ ERROR the trait bound `u16: Assoc` is not satisfied
fn main() {}