//@ run-pass pub trait Data { fn doit(&self) {} } impl Data for T {} pub trait UnaryLogic { type D: Data; } impl UnaryLogic for () { type D = i32; } pub fn crashes(t: T::D) { t.doit(); } fn main() { crashes::<()>(0); }