diff options
author | Kirill Bulatov <[email protected]> | 2020-09-07 23:24:16 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-09-09 23:42:20 +0100 |
commit | 9fb83211f95a450fdadf05f8f64be053f14dc57e (patch) | |
tree | 81386f3fe983c19f7e65d79ca3fcb969daa74851 /crates/ide/src/completion/patterns.rs | |
parent | 57a260f579fec4082aa9e7a30d4b190f06d45877 (diff) |
Complete semicolon when needed
Diffstat (limited to 'crates/ide/src/completion/patterns.rs')
-rw-r--r-- | crates/ide/src/completion/patterns.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/crates/ide/src/completion/patterns.rs b/crates/ide/src/completion/patterns.rs index bc4ce4d6f..b17ddf133 100644 --- a/crates/ide/src/completion/patterns.rs +++ b/crates/ide/src/completion/patterns.rs | |||
@@ -116,15 +116,6 @@ pub(crate) fn if_is_prev(element: SyntaxElement) -> bool { | |||
116 | .is_some() | 116 | .is_some() |
117 | } | 117 | } |
118 | 118 | ||
119 | // TODO kb generify? | ||
120 | pub(crate) fn mod_is_prev(element: SyntaxElement) -> bool { | ||
121 | element | ||
122 | .into_token() | ||
123 | .and_then(|it| previous_non_trivia_token(it)) | ||
124 | .filter(|it| it.kind() == MOD_KW) | ||
125 | .is_some() | ||
126 | } | ||
127 | |||
128 | #[test] | 119 | #[test] |
129 | fn test_if_is_prev() { | 120 | fn test_if_is_prev() { |
130 | check_pattern_is_applicable(r"if l<|>", if_is_prev); | 121 | check_pattern_is_applicable(r"if l<|>", if_is_prev); |