1 error[E0277]: `F` cannot be shared between threads safely
2 --> $DIR/closure-bounds-subtype.rs:13:22
4 LL | take_const_owned(f);
5 | ---------------- ^ `F` cannot be shared between threads safely
7 | required by a bound introduced by this call
9 note: required by a bound in `take_const_owned`
10 --> $DIR/closure-bounds-subtype.rs:4:50
12 LL | fn take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send {
13 | ^^^^ required by this bound in `take_const_owned`
14 help: use parentheses to call this type parameter
16 LL | take_const_owned(f());
18 help: consider further restricting this bound
20 LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync {
23 error: aborting due to previous error
25 For more information about this error, try `rustc --explain E0277`.