#[test] fn test() { pub struct A { f: F, } let f = || println!("1"); let a = A { f: &f }; (a.f)(); }