]> git.lizzy.rs Git - rust.git/blob - src/test/ui/kindck/kindck-nonsendable-1.stderr
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / src / test / ui / kindck / kindck-nonsendable-1.stderr
1 error[E0277]: `Rc<usize>` cannot be sent between threads safely
2   --> $DIR/kindck-nonsendable-1.rs:9:9
3    |
4 LL |     bar(move|| foo(x));
5    |     --- ------^^^^^^^
6    |     |   |
7    |     |   `Rc<usize>` cannot be sent between threads safely
8    |     |   within this `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:15]`
9    |     required by a bound introduced by this call
10    |
11    = help: within `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:15]`, the trait `Send` is not implemented for `Rc<usize>`
12 note: required because it's used within this closure
13   --> $DIR/kindck-nonsendable-1.rs:9:9
14    |
15 LL |     bar(move|| foo(x));
16    |         ^^^^^^
17 note: required by a bound in `bar`
18   --> $DIR/kindck-nonsendable-1.rs:5:21
19    |
20 LL | fn bar<F:FnOnce() + Send>(_: F) { }
21    |                     ^^^^ required by this bound in `bar`
22
23 error: aborting due to previous error
24
25 For more information about this error, try `rustc --explain E0277`.