Skip to content

Commit 6ae4c70

Browse files
committed
Improve test_no_completions_required test
1 parent 70157f0 commit 6ae4c70

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

crates/ide/src/completion.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,28 @@ mod tests {
233233

234234
#[test]
235235
fn test_no_completions_required() {
236+
// There must be no hint for 'in' keyword.
236237
check_no_completion(
237238
r#"
238239
fn foo() {
239240
for i i<|>
240241
}
241242
"#,
242-
)
243+
);
244+
// After 'in' keyword hints may be spawned.
245+
check_detail_and_documentation(
246+
r#"
247+
/// Do the foo
248+
fn foo() -> &'static str { "foo" }
249+
250+
fn bar() {
251+
for c in fo<|>
252+
}
253+
"#,
254+
DetailAndDocumentation {
255+
detail: "fn foo() -> &'static str",
256+
documentation: "Do the foo",
257+
},
258+
);
243259
}
244260
}

0 commit comments

Comments
 (0)