We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ae4c70 commit 8f303daCopy full SHA for 8f303da
crates/ide/src/completion/patterns.rs
@@ -123,6 +123,10 @@ pub(crate) fn fn_is_prev(element: SyntaxElement) -> bool {
123
.filter(|it| it.kind() == FN_KW)
124
.is_some()
125
}
126
+#[test]
127
+fn test_fn_is_prev() {
128
+ check_pattern_is_applicable(r"fn l<|>", fn_is_prev);
129
+}
130
131
/// Check if the token previous to the previous one is `for`.
132
/// For example, `for _ i<|>` => true.
@@ -134,6 +138,10 @@ pub(crate) fn for_is_prev2(element: SyntaxElement) -> bool {
134
138
.filter(|it| it.kind() == FOR_KW)
135
139
136
140
141
142
+fn test_for_is_prev2() {
143
+ check_pattern_is_applicable(r"for i i<|>", for_is_prev2);
144
137
145
146
#[test]
147
fn test_if_is_prev() {
0 commit comments