Move existing_derives into PathKind::Derive

This commit is contained in:
Lukas Wirth 2022-06-17 16:56:21 +02:00
parent 531060f103
commit 2f2ea77d88
4 changed files with 23 additions and 22 deletions

View file

@ -101,7 +101,9 @@ pub(super) enum PathKind {
kind: AttrKind,
annotated_item_kind: Option<SyntaxKind>,
},
Derive,
Derive {
existing_derives: FxHashSet<hir::Macro>,
},
/// Path in item position, that is inside an (Assoc)ItemList
Item {
kind: ItemListKind,
@ -332,8 +334,6 @@ pub(crate) struct CompletionContext<'a> {
pub(super) pattern_ctx: Option<PatternContext>,
pub(super) qualifier_ctx: QualifierCtx,
pub(super) existing_derives: FxHashSet<hir::Macro>,
pub(super) locals: FxHashMap<Name, Local>,
}
@ -556,7 +556,6 @@ impl<'a> CompletionContext<'a> {
ident_ctx: IdentContext::UnexpandedAttrTT { fake_attribute_under_caret: None },
pattern_ctx: None,
qualifier_ctx: Default::default(),
existing_derives: Default::default(),
locals,
};
ctx.expand_and_fill(