]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-bounds-subtype.stderr
Auto merge of #88088 - nbdd0121:const2, r=nagisa
[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 |     take_const_owned(f);
5    |                      ^ `F` cannot be shared between threads safely
6    |
7 note: required by a bound in `take_const_owned`
8   --> $DIR/closure-bounds-subtype.rs:4:50
9    |
10 LL | fn take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send {
11    |                                                  ^^^^ required by this bound in `take_const_owned`
12 help: consider further restricting this bound
13    |
14 LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync {
15    |                                                 +++++++++++++++++++
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.