]> git.proxmox.com Git - rustc.git/blob - src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr
ffd70fac6b19bf8bfe8e29a0bb9bbc7aecf964ba
[rustc.git] / src / test / ui / closures / closure-bounds-cant-promote-superkind-in-struct.stderr
1 error[E0277]: `F` cannot be sent between threads safely
2 --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:22
3 |
4 LL | struct X<F> where F: FnOnce() + 'static + Send {
5 | ---- required by this bound in `X`
6 ...
7 LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
8 | ^^^^ `F` cannot be sent between threads safely
9 |
10 = help: the trait `std::marker::Send` is not implemented for `F`
11 help: consider further restricting this bound
12 |
13 LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
14 | ^^^^^^^^^^^^^^^^^^^
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0277`.