From 29a52f8d56e8fa45727c9f38df819a9f82a4eb6f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 30 Dec 2018 22:14:35 +0300 Subject: refine semi completion --- crates/ra_analysis/src/completion/complete_keyword.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crates/ra_analysis/src/completion/complete_keyword.rs') diff --git a/crates/ra_analysis/src/completion/complete_keyword.rs b/crates/ra_analysis/src/completion/complete_keyword.rs index b2486104a..d70fdaada 100644 --- a/crates/ra_analysis/src/completion/complete_keyword.rs +++ b/crates/ra_analysis/src/completion/complete_keyword.rs @@ -191,6 +191,24 @@ mod tests { return "return $0;" "#, ); + check_keyword_completion( + r" + fn quux() -> i32 { + if condition { + <|> + } + let x = 92; + x + } + ", + r#" + if "if $0 {}" + match "match $0 {}" + while "while $0 {}" + loop "loop {$0}" + return "return $0;" + "#, + ); } #[test] -- cgit v1.2.3