]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/async-await-let-else.no-drop-tracking.stderr
Rollup merge of #106971 - oli-obk:tait_error, r=davidtwco
[rust.git] / tests / ui / async-await / async-await-let-else.no-drop-tracking.stderr
1 error: future cannot be sent between threads safely
2   --> $DIR/async-await-let-else.rs:48:13
3    |
4 LL |     is_send(foo(Some(true)));
5    |             ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send`
6    |
7    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
8 note: future is not `Send` as this value is used across an await
9   --> $DIR/async-await-let-else.rs:11:14
10    |
11 LL |         let r = Rc::new(());
12    |             - has type `Rc<()>` which is not `Send`
13 LL |         bar().await
14    |              ^^^^^^ await occurs here, with `r` maybe used later
15 LL |     };
16    |     - `r` is later dropped here
17 note: required by a bound in `is_send`
18   --> $DIR/async-await-let-else.rs:19:15
19    |
20 LL | fn is_send<T: Send>(_: T) {}
21    |               ^^^^ required by this bound in `is_send`
22
23 error: future cannot be sent between threads safely
24   --> $DIR/async-await-let-else.rs:50:13
25    |
26 LL |     is_send(foo2(Some(true)));
27    |             ^^^^^^^^^^^^^^^^ future returned by `foo2` is not `Send`
28    |
29    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
30 note: future is not `Send` as this value is used across an await
31   --> $DIR/async-await-let-else.rs:23:26
32    |
33 LL |         bar2(Rc::new(())).await
34    |              ----------- ^^^^^^ await occurs here, with `Rc::new(())` maybe used later
35    |              |
36    |              has type `Rc<()>` which is not `Send`
37 LL |     };
38    |     - `Rc::new(())` is later dropped here
39 note: required by a bound in `is_send`
40   --> $DIR/async-await-let-else.rs:19:15
41    |
42 LL | fn is_send<T: Send>(_: T) {}
43    |               ^^^^ required by this bound in `is_send`
44
45 error: future cannot be sent between threads safely
46   --> $DIR/async-await-let-else.rs:52:13
47    |
48 LL |     is_send(foo3(Some(true)));
49    |             ^^^^^^^^^^^^^^^^ future returned by `foo3` is not `Send`
50    |
51    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
52 note: future is not `Send` as this value is used across an await
53   --> $DIR/async-await-let-else.rs:33:28
54    |
55 LL |         (Rc::new(()), bar().await);
56    |          -----------       ^^^^^^ - `Rc::new(())` is later dropped here
57    |          |                 |
58    |          |                 await occurs here, with `Rc::new(())` maybe used later
59    |          has type `Rc<()>` which is not `Send`
60 note: required by a bound in `is_send`
61   --> $DIR/async-await-let-else.rs:19:15
62    |
63 LL | fn is_send<T: Send>(_: T) {}
64    |               ^^^^ required by this bound in `is_send`
65
66 error: future cannot be sent between threads safely
67   --> $DIR/async-await-let-else.rs:54:13
68    |
69 LL |     is_send(foo4(Some(true)));
70    |             ^^^^^^^^^^^^^^^^ future returned by `foo4` is not `Send`
71    |
72    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
73 note: future is not `Send` as this value is used across an await
74   --> $DIR/async-await-let-else.rs:41:14
75    |
76 LL |         let r = Rc::new(());
77    |             - has type `Rc<()>` which is not `Send`
78 LL |         bar().await;
79    |              ^^^^^^ await occurs here, with `r` maybe used later
80 ...
81 LL |     };
82    |     - `r` is later dropped here
83 note: required by a bound in `is_send`
84   --> $DIR/async-await-let-else.rs:19:15
85    |
86 LL | fn is_send<T: Send>(_: T) {}
87    |               ^^^^ required by this bound in `is_send`
88
89 error: aborting due to 4 previous errors
90