diff options
author | Aleksey Kladov <[email protected]> | 2018-12-30 19:14:35 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-30 19:14:35 +0000 |
commit | 29a52f8d56e8fa45727c9f38df819a9f82a4eb6f (patch) | |
tree | fe00b007d5a699f75175c96a562a45c0ed1d880c /crates/ra_analysis/src/completion/complete_keyword.rs | |
parent | c0d1b17a4e976e07966a1d7f545b6e01d278fd08 (diff) |
refine semi completion
Diffstat (limited to 'crates/ra_analysis/src/completion/complete_keyword.rs')
-rw-r--r-- | crates/ra_analysis/src/completion/complete_keyword.rs | 18 |
1 files changed, 18 insertions, 0 deletions
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 { | |||
191 | return "return $0;" | 191 | return "return $0;" |
192 | "#, | 192 | "#, |
193 | ); | 193 | ); |
194 | check_keyword_completion( | ||
195 | r" | ||
196 | fn quux() -> i32 { | ||
197 | if condition { | ||
198 | <|> | ||
199 | } | ||
200 | let x = 92; | ||
201 | x | ||
202 | } | ||
203 | ", | ||
204 | r#" | ||
205 | if "if $0 {}" | ||
206 | match "match $0 {}" | ||
207 | while "while $0 {}" | ||
208 | loop "loop {$0}" | ||
209 | return "return $0;" | ||
210 | "#, | ||
211 | ); | ||
194 | } | 212 | } |
195 | 213 | ||
196 | #[test] | 214 | #[test] |