]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-bounds-subtype.stderr
Merge commit '48d60ab7c505c6c1ebb042eacaafd8dc9f7a9267' into libgccjit-codegen
[rust.git] / src / test / ui / closures / closure-bounds-subtype.stderr
1 error[E0277]: `F` cannot be shared between threads safely
2   --> $DIR/closure-bounds-subtype.rs:13:22
3    |
4 LL | fn take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send {
5    |                                                  ---- required by this bound in `take_const_owned`
6 ...
7 LL |     take_const_owned(f);
8    |                      ^ `F` cannot be shared between threads safely
9    |
10 help: consider further restricting this bound
11    |
12 LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync {
13    |                                                 ^^^^^^^^^^^^^^^^^^^
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0277`.