aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/context.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-17 14:44:38 +0100
committerGitHub <[email protected]>2021-06-17 14:44:38 +0100
commit3ae0c5911ab50ee209179ee4329b0551abe6fc48 (patch)
tree8c8fb1436a64a6bfd56558f41b734a966aa5725e /crates/ide_completion/src/context.rs
parentc82a9141abe6b6cbf5b55710dc8a315a3839081b (diff)
parent2a48b532208de413e4e5d39e81c33a4644ecaa22 (diff)
Merge #9312
9312: internal: Move out item specific completion tests r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide_completion/src/context.rs')
-rw-r--r--crates/ide_completion/src/context.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs
index 240cac1de..d7a7e9cca 100644
--- a/crates/ide_completion/src/context.rs
+++ b/crates/ide_completion/src/context.rs
@@ -305,6 +305,10 @@ impl<'a> CompletionContext<'a> {
305 ) 305 )
306 } 306 }
307 307
308 pub(crate) fn has_impl_prev_sibling(&self) -> bool {
309 matches!(self.prev_sibling, Some(ImmediatePrevSibling::ImplDefType))
310 }
311
308 pub(crate) fn has_visibility_prev_sibling(&self) -> bool { 312 pub(crate) fn has_visibility_prev_sibling(&self) -> bool {
309 matches!(self.prev_sibling, Some(ImmediatePrevSibling::Visibility)) 313 matches!(self.prev_sibling, Some(ImmediatePrevSibling::Visibility))
310 } 314 }