Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/context/tests.rs')
-rw-r--r--crates/ide-completion/src/context/tests.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/crates/ide-completion/src/context/tests.rs b/crates/ide-completion/src/context/tests.rs
index 24647ab627..e798f3b23a 100644
--- a/crates/ide-completion/src/context/tests.rs
+++ b/crates/ide-completion/src/context/tests.rs
@@ -373,7 +373,6 @@ fn foo() -> u32 {
#[test]
fn expected_type_closure_param_return() {
- // FIXME: make this work with `|| $0`
check_expected_type_and_name(
r#"
//- minicore: fn
@@ -385,6 +384,18 @@ fn bar(f: impl FnOnce() -> u32) {}
"#,
expect![[r#"ty: u32, name: ?"#]],
);
+
+ check_expected_type_and_name(
+ r#"
+//- minicore: fn
+fn foo() {
+ bar(|| $0);
+}
+
+fn bar(f: impl FnOnce() -> u32) {}
+"#,
+ expect![[r#"ty: u32, name: ?"#]],
+ );
}
#[test]