You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/ui/async-await/issue-98634.rs
-1
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,5 @@ fn main() {
45
45
StructAsync{ callback }.await;
46
46
//~^ ERROR 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 = ()>`
47
47
//~| ERROR 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 = ()>`
48
-
//~| ERROR 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 = ()>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
19
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
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
38
-
39
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 = ()>`
40
21
--> $DIR/issue-98634.rs:45:33
41
22
|
@@ -55,6 +36,6 @@ note: required by a bound in `StructAsync`
0 commit comments