Correct completions in items tests

This commit is contained in:
Lukas Wirth 2021-06-17 15:43:21 +02:00
parent a9a77671f2
commit 2a48b53220
5 changed files with 57 additions and 24 deletions

View file

@ -305,6 +305,10 @@ impl<'a> CompletionContext<'a> {
)
}
pub(crate) fn has_impl_prev_sibling(&self) -> bool {
matches!(self.prev_sibling, Some(ImmediatePrevSibling::ImplDefType))
}
pub(crate) fn has_visibility_prev_sibling(&self) -> bool {
matches!(self.prev_sibling, Some(ImmediatePrevSibling::Visibility))
}