trait TT {} impl dyn TT { fn func(&self) {} } fn main() { let f = |x: &dyn TT| x.func(); //~ ERROR: mismatched types }