]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/issue-99914.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / impl-trait / issue-99914.rs
1 // edition:2021
2
3 fn main() {}
4
5 struct Error;
6 struct Okay;
7
8 fn foo(t: Result<Okay, Error>) {
9     t.and_then(|t| -> _ { bar(t) });
10     //~^ ERROR mismatched types
11 }
12
13 async fn bar(t: Okay) {}