take_any<F>(_: F) where F: FnOnce()1fn take_any<F>(_: F) where F: FnOnce() { 2 } 3 take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send4fn take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send { 5 } 6 give_any<F>(f: F) where F: FnOnce()7fn give_any<F>(f: F) where F: FnOnce() { 8 take_any(f); 9 } 10 give_owned<F>(f: F) where F: FnOnce() + Send11fn give_owned<F>(f: F) where F: FnOnce() + Send { 12 take_any(f); 13 take_const_owned(f); //~ ERROR `F` cannot be shared between threads safely [E0277] 14 } 15 main()16fn main() {} 17