1 2 3 4 5 6
// run-pass fn something<F>(f: F) where F: FnOnce() { f(); } pub fn main() { something(|| println!("hi!") ); }