From 7c4eb66c1acf10216fa866e05d646bdaea229ded Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 22 Mar 2021 15:56:59 +0100 Subject: Merge hir::MacroDef::is_* into hir::MacroDef::kind --- crates/ide_completion/src/completions/attribute.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ide_completion/src') diff --git a/crates/ide_completion/src/completions/attribute.rs b/crates/ide_completion/src/completions/attribute.rs index e846678b4..b1505c74b 100644 --- a/crates/ide_completion/src/completions/attribute.rs +++ b/crates/ide_completion/src/completions/attribute.rs @@ -246,7 +246,8 @@ fn get_derive_names_in_scope(ctx: &CompletionContext) -> FxHashSet { let mut result = FxHashSet::default(); ctx.scope.process_all_names(&mut |name, scope_def| { if let hir::ScopeDef::MacroDef(mac) = scope_def { - if mac.is_derive_macro() { + // FIXME kind() doesn't check whether proc-macro is a derive + if mac.kind() == hir::MacroKind::Derive || mac.kind() == hir::MacroKind::ProcMacro { result.insert(name.to_string()); } } -- cgit v1.2.3