diff options
Diffstat (limited to 'tests/ui/impl-trait/issue-99914.rs')
-rw-r--r-- | tests/ui/impl-trait/issue-99914.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/issue-99914.rs b/tests/ui/impl-trait/issue-99914.rs new file mode 100644 index 000000000..4324a0229 --- /dev/null +++ b/tests/ui/impl-trait/issue-99914.rs @@ -0,0 +1,13 @@ +// edition:2021 + +fn main() {} + +struct Error; +struct Okay; + +fn foo(t: Result<Okay, Error>) { + t.and_then(|t| -> _ { bar(t) }); + //~^ ERROR mismatched types +} + +async fn bar(t: Okay) {} |