aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion/patterns.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion/patterns.rs')
-rw-r--r--crates/ra_ide/src/completion/patterns.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide/src/completion/patterns.rs b/crates/ra_ide/src/completion/patterns.rs
index b2fe13280..175209d8a 100644
--- a/crates/ra_ide/src/completion/patterns.rs
+++ b/crates/ra_ide/src/completion/patterns.rs
@@ -13,7 +13,7 @@ use crate::completion::test_utils::check_pattern_is_applicable;
13 13
14pub(crate) fn has_trait_parent(element: SyntaxElement) -> bool { 14pub(crate) fn has_trait_parent(element: SyntaxElement) -> bool {
15 not_same_range_ancestor(element) 15 not_same_range_ancestor(element)
16 .filter(|it| it.kind() == ITEM_LIST) 16 .filter(|it| it.kind() == ASSOC_ITEM_LIST)
17 .and_then(|it| it.parent()) 17 .and_then(|it| it.parent())
18 .filter(|it| it.kind() == TRAIT_DEF) 18 .filter(|it| it.kind() == TRAIT_DEF)
19 .is_some() 19 .is_some()
@@ -25,7 +25,7 @@ fn test_has_trait_parent() {
25 25
26pub(crate) fn has_impl_parent(element: SyntaxElement) -> bool { 26pub(crate) fn has_impl_parent(element: SyntaxElement) -> bool {
27 not_same_range_ancestor(element) 27 not_same_range_ancestor(element)
28 .filter(|it| it.kind() == ITEM_LIST) 28 .filter(|it| it.kind() == ASSOC_ITEM_LIST)
29 .and_then(|it| it.parent()) 29 .and_then(|it| it.parent())
30 .filter(|it| it.kind() == IMPL_DEF) 30 .filter(|it| it.kind() == IMPL_DEF)
31 .is_some() 31 .is_some()
@@ -73,7 +73,7 @@ pub(crate) fn has_item_list_or_source_file_parent(element: SyntaxElement) -> boo
73#[test] 73#[test]
74fn test_has_item_list_or_source_file_parent() { 74fn test_has_item_list_or_source_file_parent() {
75 check_pattern_is_applicable(r"i<|>", has_item_list_or_source_file_parent); 75 check_pattern_is_applicable(r"i<|>", has_item_list_or_source_file_parent);
76 check_pattern_is_applicable(r"impl { f<|> }", has_item_list_or_source_file_parent); 76 check_pattern_is_applicable(r"mod foo { f<|> }", has_item_list_or_source_file_parent);
77} 77}
78 78
79pub(crate) fn is_match_arm(element: SyntaxElement) -> bool { 79pub(crate) fn is_match_arm(element: SyntaxElement) -> bool {