fix: Fix completions not working after attributes

This commit is contained in:
Lukas Wirth 2022-05-23 17:20:42 +02:00
parent db9930b986
commit 2aa22730f1
3 changed files with 11 additions and 11 deletions

View file

@ -371,10 +371,7 @@ impl<'a> CompletionContext<'a> {
// FIXME: This shouldn't exist
pub(crate) fn is_path_disallowed(&self) -> bool {
self.previous_token_is(T![unsafe])
|| matches!(
self.prev_sibling,
Some(ImmediatePrevSibling::Attribute | ImmediatePrevSibling::Visibility)
)
|| matches!(self.prev_sibling, Some(ImmediatePrevSibling::Visibility))
|| matches!(
self.completion_location,
Some(ImmediateLocation::RecordPat(_) | ImmediateLocation::RecordExpr(_))