]> git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/issue-98634.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / async-await / issue-98634.stderr
1 error[E0271]: expected `fn() -> impl Future<Output = ()> {callback}` to be a fn item that returns `Pin<Box<(dyn Future<Output = ()> + 'static)>>`, but it returns `impl Future<Output = ()>`
2 --> $DIR/issue-98634.rs:45:23
3 |
4 LL | StructAsync { callback }.await;
5 | ^^^^^^^^ expected struct `Pin`, found opaque type
6 |
7 note: while checking the return type of the `async fn`
8 --> $DIR/issue-98634.rs:24:21
9 |
10 LL | async fn callback() {}
11 | ^ checked the `Output` of this `async fn`, found opaque type
12 = note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
13 found opaque type `impl Future<Output = ()>`
14 note: required by a bound in `StructAsync`
15 --> $DIR/issue-98634.rs:9:35
16 |
17 LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
19
20 error[E0271]: expected `fn() -> impl Future<Output = ()> {callback}` to be a fn item that returns `Pin<Box<(dyn Future<Output = ()> + 'static)>>`, but it returns `impl Future<Output = ()>`
21 --> $DIR/issue-98634.rs:45:9
22 |
23 LL | StructAsync { callback }.await;
24 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Pin`, found opaque type
25 |
26 note: while checking the return type of the `async fn`
27 --> $DIR/issue-98634.rs:24:21
28 |
29 LL | async fn callback() {}
30 | ^ checked the `Output` of this `async fn`, found opaque type
31 = note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
32 found opaque type `impl Future<Output = ()>`
33 note: required by a bound in `StructAsync`
34 --> $DIR/issue-98634.rs:9:35
35 |
36 LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
38
39 error[E0271]: expected `fn() -> impl Future<Output = ()> {callback}` to be a fn item that returns `Pin<Box<(dyn Future<Output = ()> + 'static)>>`, but it returns `impl Future<Output = ()>`
40 --> $DIR/issue-98634.rs:45:33
41 |
42 LL | StructAsync { callback }.await;
43 | ^^^^^^ expected struct `Pin`, found opaque type
44 |
45 note: while checking the return type of the `async fn`
46 --> $DIR/issue-98634.rs:24:21
47 |
48 LL | async fn callback() {}
49 | ^ checked the `Output` of this `async fn`, found opaque type
50 = note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
51 found opaque type `impl Future<Output = ()>`
52 note: required by a bound in `StructAsync`
53 --> $DIR/issue-98634.rs:9:35
54 |
55 LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
57
58 error: aborting due to 3 previous errors
59
60 For more information about this error, try `rustc --explain E0271`.