take_any<F>(_: F) where F: FnOnce()1 fn take_any<F>(_: F) where F: FnOnce() {
2 }
3 
take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send4 fn take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send {
5 }
6 
give_any<F>(f: F) where F: FnOnce()7 fn give_any<F>(f: F) where F: FnOnce() {
8     take_any(f);
9 }
10 
give_owned<F>(f: F) where F: FnOnce() + Send11 fn 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()16 fn main() {}
17