]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / async-await / issue-70935-complex-spans.drop_tracking.stderr
CommitLineData
923072b8 1error[E0277]: `Sender<i32>` cannot be shared between threads safely
f2b60f7d 2 --> $DIR/issue-70935-complex-spans.rs:13:45
923072b8
FG
3 |
4LL | 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 9note: required because it's used within this closure
f2b60f7d 10 --> $DIR/issue-70935-complex-spans.rs:17:13
923072b8 11 |
064997fb
FG
12LL | baz(|| async{
13 | ^^
923072b8 14note: required because it's used within this `async fn` body
f2b60f7d 15 --> $DIR/issue-70935-complex-spans.rs:10:67
923072b8
FG
16 |
17LL | async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> {
18 | ___________________________________________________________________^
923072b8
FG
19LL | | }
20 | |_^
064997fb 21 = note: required because it captures the following types: `ResumeTy`, `impl for<'r, 's, 't0> Future<Output = ()>`, `()`
923072b8 22note: required because it's used within this `async` block
f2b60f7d 23 --> $DIR/issue-70935-complex-spans.rs:16:16
923072b8
FG
24 |
25LL | async move {
26 | ________________^
923072b8
FG
27LL | | baz(|| async{
28LL | | foo(tx.clone());
29LL | | }).await;
30LL | | }
31 | |_____^
32
33error: aborting due to previous error
34
35For more information about this error, try `rustc --explain E0277`.