]>
Commit | Line | Data |
---|---|---|
923072b8 | 1 | error[E0277]: `Sender<i32>` cannot be shared between threads safely |
f2b60f7d | 2 | --> $DIR/issue-70935-complex-spans.rs:13:45 |
923072b8 FG |
3 | | |
4 | LL | fn foo(tx: std::sync::mpsc::Sender<i32>) -> impl Future + Send { | |
5 | | ^^^^^^^^^^^^^^^^^^ `Sender<i32>` cannot be shared between threads safely | |
6 | | | |
7 | = help: the trait `Sync` is not implemented for `Sender<i32>` | |
f2b60f7d | 8 | = note: required for `&Sender<i32>` to implement `Send` |
923072b8 | 9 | note: required because it's used within this closure |
f2b60f7d | 10 | --> $DIR/issue-70935-complex-spans.rs:17:13 |
923072b8 | 11 | | |
064997fb FG |
12 | LL | baz(|| async{ |
13 | | ^^ | |
923072b8 | 14 | note: required because it's used within this `async fn` body |
f2b60f7d | 15 | --> $DIR/issue-70935-complex-spans.rs:10:67 |
923072b8 FG |
16 | | |
17 | LL | async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> { | |
18 | | ___________________________________________________________________^ | |
923072b8 FG |
19 | LL | | } |
20 | | |_^ | |
064997fb | 21 | = note: required because it captures the following types: `ResumeTy`, `impl for<'r, 's, 't0> Future<Output = ()>`, `()` |
923072b8 | 22 | note: required because it's used within this `async` block |
f2b60f7d | 23 | --> $DIR/issue-70935-complex-spans.rs:16:16 |
923072b8 FG |
24 | | |
25 | LL | async move { | |
26 | | ________________^ | |
923072b8 FG |
27 | LL | | baz(|| async{ |
28 | LL | | foo(tx.clone()); | |
29 | LL | | }).await; | |
30 | LL | | } | |
31 | | |_____^ | |
32 | ||
33 | error: aborting due to previous error | |
34 | ||
35 | For more information about this error, try `rustc --explain E0277`. |