aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/completion.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/crates/ide/src/completion.rs b/crates/ide/src/completion.rs
index 570091ba3..69e875014 100644
--- a/crates/ide/src/completion.rs
+++ b/crates/ide/src/completion.rs
@@ -233,12 +233,28 @@ mod tests {
233 233
234 #[test] 234 #[test]
235 fn test_no_completions_required() { 235 fn test_no_completions_required() {
236 // There must be no hint for 'in' keyword.
236 check_no_completion( 237 check_no_completion(
237 r#" 238 r#"
238 fn foo() { 239 fn foo() {
239 for i i<|> 240 for i i<|>
240 } 241 }
241 "#, 242 "#,
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 );
243 } 259 }
244} 260}