diff --git a/crates/ide/src/completion.rs b/crates/ide/src/completion.rs index 570091ba3d18..69e875014f19 100644 --- a/crates/ide/src/completion.rs +++ b/crates/ide/src/completion.rs @@ -233,12 +233,28 @@ mod tests { #[test] fn test_no_completions_required() { + // There must be no hint for 'in' keyword. check_no_completion( r#" fn foo() { for i i<|> } "#, - ) + ); + // After 'in' keyword hints may be spawned. + check_detail_and_documentation( + r#" + /// Do the foo + fn foo() -> &'static str { "foo" } + + fn bar() { + for c in fo<|> + } + "#, + DetailAndDocumentation { + detail: "fn foo() -> &'static str", + documentation: "Do the foo", + }, + ); } }