Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/simple.rs')
| -rw-r--r-- | crates/hir-ty/src/tests/simple.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/simple.rs b/crates/hir-ty/src/tests/simple.rs index 1e75c31fa1..fbe7c3bd37 100644 --- a/crates/hir-ty/src/tests/simple.rs +++ b/crates/hir-ty/src/tests/simple.rs @@ -4032,6 +4032,7 @@ fn main() { 100..147 'async_... })': () 114..146 'async ... }': impl AsyncFnOnce(i32) 121..124 'arg': i32 + 121..124 'arg': i32 126..146 '{ ... }': () 136..139 'arg': i32 153..160 'closure': fn closure<impl FnOnce(i32)>(impl FnOnce(i32)) @@ -4279,3 +4280,17 @@ union U { "#]], ); } + +#[test] +fn async_closure_with_params() { + check_no_mismatches( + r#" +fn foo() { + let capture = false; + async move |param: i32| { + capture; + }; +} + "#, + ); +} |