aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions/attribute
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/completions/attribute')
-rw-r--r--crates/ide_completion/src/completions/attribute/derive.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ide_completion/src/completions/attribute/derive.rs b/crates/ide_completion/src/completions/attribute/derive.rs
index 634c0cb00..0bc3eab98 100644
--- a/crates/ide_completion/src/completions/attribute/derive.rs
+++ b/crates/ide_completion/src/completions/attribute/derive.rs
@@ -50,8 +50,7 @@ fn get_derive_names_in_scope(ctx: &CompletionContext) -> FxHashSet<String> {
50 let mut result = FxHashSet::default(); 50 let mut result = FxHashSet::default();
51 ctx.scope.process_all_names(&mut |name, scope_def| { 51 ctx.scope.process_all_names(&mut |name, scope_def| {
52 if let hir::ScopeDef::MacroDef(mac) = scope_def { 52 if let hir::ScopeDef::MacroDef(mac) = scope_def {
53 // FIXME kind() doesn't check whether proc-macro is a derive 53 if mac.kind() == hir::MacroKind::Derive {
54 if mac.kind() == hir::MacroKind::Derive || mac.kind() == hir::MacroKind::ProcMacro {
55 result.insert(name.to_string()); 54 result.insert(name.to_string());
56 } 55 }
57 } 56 }