blob: e71c2af0c85d6b8d7ad2be4be8e923e9e4a0199f (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//@ run-pass
pub trait Data { fn doit(&self) {} }
impl<T> Data for T {}
pub trait UnaryLogic { type D: Data; }
impl UnaryLogic for () { type D = i32; }
pub fn crashes<T: UnaryLogic>(t: T::D) {
t.doit();
}
fn main() { crashes::<()>(0); }
|