]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr
Rollup merge of #101939 - zhaixiaojuan:loongarch64-abi, r=oli-obk
[rust.git] / src / test / ui / async-await / issue-70935-complex-spans.drop_tracking.stderr
1 error[E0277]: `Sender<i32>` cannot be shared between threads safely
2   --> $DIR/issue-70935-complex-spans.rs:13:45
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>`
8    = note: required for `&Sender<i32>` to implement `Send`
9 note: required because it's used within this closure
10   --> $DIR/issue-70935-complex-spans.rs:17:13
11    |
12 LL |         baz(|| async{
13    |             ^^
14 note: required because it's used within this `async fn` body
15   --> $DIR/issue-70935-complex-spans.rs:10:67
16    |
17 LL |   async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> {
18    |  ___________________________________________________________________^
19 LL | | }
20    | |_^
21    = note: required because it captures the following types: `ResumeTy`, `impl Future<Output = ()>`, `()`
22 note: required because it's used within this `async` block
23   --> $DIR/issue-70935-complex-spans.rs:16:16
24    |
25 LL |       async move {
26    |  ________________^
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`.