summaryrefslogtreecommitdiffstats
path: root/src/test/ui/specialization/min_specialization/repeated_projection_type.rs
blob: f21f39f066981f922833615da1162050ebd36194 (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
// Test that projection bounds can't be specialized on.

#![feature(min_specialization)]

trait X {
    fn f();
}
trait Id {
    type This;
}
impl<T> Id for T {
    type This = T;
}

impl<T: Id> X for T {
    default fn f() {}
}

impl<I, V: Id<This = (I,)>> X for V {
    //~^ ERROR cannot specialize on
    fn f() {}
}

fn main() {}