]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr
Rollup merge of #106008 - uweigand:s390x-lintgroup-order, r=Nilstrieb
[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:5
24    |
25 LL | /     async move {
26 LL | |         baz(|| async{
27 LL | |             foo(tx.clone());
28 LL | |         }).await;
29 LL | |     }
30    | |_____^
31
32 error: aborting due to previous error
33
34 For more information about this error, try `rustc --explain E0277`.