1 error[E0308]: mismatched types
2 --> $DIR/issue-99914.rs:9:27
4 LL | t.and_then(|t| -> _ { bar(t) });
5 | ^^^^^^ expected enum `Result`, found opaque type
7 note: while checking the return type of the `async fn`
8 --> $DIR/issue-99914.rs:13:23
10 LL | async fn bar(t: Okay) {}
11 | ^ checked the `Output` of this `async fn`, found opaque type
12 = note: expected enum `Result<_, Error>`
13 found opaque type `impl Future<Output = ()>`
14 help: try wrapping the expression in `Ok`
16 LL | t.and_then(|t| -> _ { Ok(bar(t)) });
19 error: aborting due to previous error
21 For more information about this error, try `rustc --explain E0308`.