1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use inherent::inherent; pub trait Trait { type Assoc; fn f() -> Self::Assoc; } pub struct Struct; #[inherent] impl Trait for Struct { type Assoc = (); // TODO: https://github.com/dtolnay/inherent/issues/15 fn f() -> Self::Assoc {} } fn main() {}