use std::ops::RangeFull; trait Trait { fn method(&self) -> fn(); } impl Trait for RangeFull { fn method(&self) -> fn() { print!("1"); || print!("3") } } impl T, T> Trait for F { fn method(&self) -> fn() { print!("2"); || print!("4") } } fn main() { (|| .. .method())(); }