diff options
author | Lukas Wirth <[email protected]> | 2021-06-16 16:45:58 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-16 20:51:20 +0100 |
commit | 1a8f76a224aff472cf29bab828f313c19e31eb02 (patch) | |
tree | bf7b7c157e632be799980ed18e60b8a584b854ed /crates/ide_completion/src/context.rs | |
parent | d338a803941c2b0ac83decfcdfac33c09dfaa971 (diff) |
Don't complete visibility accessors after existing ones
Diffstat (limited to 'crates/ide_completion/src/context.rs')
-rw-r--r-- | crates/ide_completion/src/context.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs index a8437d81c..3885db702 100644 --- a/crates/ide_completion/src/context.rs +++ b/crates/ide_completion/src/context.rs | |||
@@ -302,6 +302,10 @@ impl<'a> CompletionContext<'a> { | |||
302 | ) | 302 | ) |
303 | } | 303 | } |
304 | 304 | ||
305 | pub(crate) fn has_visibility_prev_sibling(&self) -> bool { | ||
306 | matches!(self.prev_sibling, Some(ImmediatePrevSibling::Visibility)) | ||
307 | } | ||
308 | |||
305 | pub(crate) fn after_if(&self) -> bool { | 309 | pub(crate) fn after_if(&self) -> bool { |
306 | matches!(self.prev_sibling, Some(ImmediatePrevSibling::IfExpr)) | 310 | matches!(self.prev_sibling, Some(ImmediatePrevSibling::IfExpr)) |
307 | } | 311 | } |