| ------- this expression has type `impl Future<Output = Tuple>`
LL |
LL | Tuple(_) => {}
- | ^^^^^^^^ expected opaque type, found struct `Tuple`
+ | ^^^^^^^^ expected opaque type, found `Tuple`
|
- note: while checking the return type of the `async fn`
- --> $DIR/issue-61076.rs:56:21
- |
- LL | async fn tuple() -> Tuple {
- | ^^^^^ checked the `Output` of this `async fn`, expected opaque type
= note: expected opaque type `impl Future<Output = Tuple>`
found struct `Tuple`
help: consider `await`ing on the `Future`
--> $DIR/issue-98634.rs:45:23
|
LL | StructAsync { callback }.await;
- | ^^^^^^^^ expected struct `Pin`, found opaque type
+ | ^^^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found opaque type
|
- note: while checking the return type of the `async fn`
- --> $DIR/issue-98634.rs:24:21
- |
- LL | async fn callback() {}
- | ^ checked the `Output` of this `async fn`, found opaque type
= note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
found opaque type `impl Future<Output = ()>`
note: required by a bound in `StructAsync`
--> $DIR/issue-98634.rs:45:9
|
LL | StructAsync { callback }.await;
- | ^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Pin`, found opaque type
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found opaque type
|
- note: while checking the return type of the `async fn`
- --> $DIR/issue-98634.rs:24:21
- |
- LL | async fn callback() {}
- | ^ checked the `Output` of this `async fn`, found opaque type
= note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
found opaque type `impl Future<Output = ()>`
note: required by a bound in `StructAsync`
--> $DIR/issue-98634.rs:45:33
|
LL | StructAsync { callback }.await;
- | ^^^^^^ expected struct `Pin`, found opaque type
+ | ^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found opaque type
|
- note: while checking the return type of the `async fn`
- --> $DIR/issue-98634.rs:24:21
- |
- LL | async fn callback() {}
- | ^ checked the `Output` of this `async fn`, found opaque type
= note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
found opaque type `impl Future<Output = ()>`
note: required by a bound in `StructAsync`
| -------------- this expression has type `impl Future<Output = Result<(), ()>>`
...
LL | Ok(_) => {}
- | ^^^^^ expected opaque type, found enum `Result`
+ | ^^^^^ expected opaque type, found `Result<_, _>`
|
- note: while checking the return type of the `async fn`
- --> $DIR/suggest-missing-await.rs:57:28
- |
- LL | async fn dummy_result() -> Result<(), ()> {
- | ^^^^^^^^^^^^^^ checked the `Output` of this `async fn`, expected opaque type
= note: expected opaque type `impl Future<Output = Result<(), ()>>`
found enum `Result<_, _>`
help: consider `await`ing on the `Future`
| -------------- this expression has type `impl Future<Output = Result<(), ()>>`
...
LL | Err(_) => {}
- | ^^^^^^ expected opaque type, found enum `Result`
+ | ^^^^^^ expected opaque type, found `Result<_, _>`
|
- note: while checking the return type of the `async fn`
- --> $DIR/suggest-missing-await.rs:57:28
- |
- LL | async fn dummy_result() -> Result<(), ()> {
- | ^^^^^^^^^^^^^^ checked the `Output` of this `async fn`, expected opaque type
= note: expected opaque type `impl Future<Output = Result<(), ()>>`
found enum `Result<_, _>`
help: consider `await`ing on the `Future`
--> $DIR/issue-99914.rs:9:27
|
LL | t.and_then(|t| -> _ { bar(t) });
- | ^^^^^^ expected enum `Result`, found opaque type
+ | ^^^^^^ expected `Result<_, Error>`, found opaque type
|
- note: while checking the return type of the `async fn`
- --> $DIR/issue-99914.rs:13:23
- |
- LL | async fn bar(t: Okay) {}
- | ^ checked the `Output` of this `async fn`, found opaque type
= note: expected enum `Result<_, Error>`
found opaque type `impl Future<Output = ()>`
help: try wrapping the expression in `Ok`
--> $DIR/issue-98604.rs:9:5
|
LL | Box::new(test) as AsyncFnPtr;
- | ^^^^^^^^^^^^^^ expected struct `Pin`, found opaque type
+ | ^^^^^^^^^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found opaque type
|
- note: while checking the return type of the `async fn`
- --> $DIR/issue-98604.rs:5:17
- |
- LL | async fn test() {}
- | ^ checked the `Output` of this `async fn`, found opaque type
= note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
found opaque type `impl Future<Output = ()>`
= note: required for the cast from `fn() -> impl Future<Output = ()> {test}` to the object type `dyn Fn() -> Pin<Box<(dyn Future<Output = ()> + 'static)>>`