mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Don't complete visibility accessors after existing ones
This commit is contained in:
parent
d338a80394
commit
1a8f76a224
4 changed files with 24 additions and 3 deletions
|
@ -302,6 +302,10 @@ impl<'a> CompletionContext<'a> {
|
|||
)
|
||||
}
|
||||
|
||||
pub(crate) fn has_visibility_prev_sibling(&self) -> bool {
|
||||
matches!(self.prev_sibling, Some(ImmediatePrevSibling::Visibility))
|
||||
}
|
||||
|
||||
pub(crate) fn after_if(&self) -> bool {
|
||||
matches!(self.prev_sibling, Some(ImmediatePrevSibling::IfExpr))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue