trait empty {} trait Ass { type A; type B; } #[derive(Debug)] struct Unit; impl Ass for Unit { type A = Self; type B = u8; } impl Iterator for Unit { type Item = Self; fn next(&mut self) -> Option { Some(Unit) } } fn main(){ println!("ass"); let unit = Unit; let mut a : ::A = Unit; let b : ::B = 8; let b = a.next().unwrap(); println!("{:?}", b); }