struct Params; pub trait Plugin { type Error; } pub trait Pluggable { fn get_ref>(&mut self) -> Option { None } } struct Foo; impl Plugin for Params { type Error = (); } impl Pluggable for T {} fn handle(req: &mut i32) { req.get_ref::(); //~^ ERROR the trait bound `Params: Plugin` is not satisfied } fn main() {}