diff options
Diffstat (limited to 'crates/ide_completion/src/completions/attribute.rs')
-rw-r--r-- | crates/ide_completion/src/completions/attribute.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<String> { | |||
246 | let mut result = FxHashSet::default(); | 246 | let mut result = FxHashSet::default(); |
247 | ctx.scope.process_all_names(&mut |name, scope_def| { | 247 | ctx.scope.process_all_names(&mut |name, scope_def| { |
248 | if let hir::ScopeDef::MacroDef(mac) = scope_def { | 248 | if let hir::ScopeDef::MacroDef(mac) = scope_def { |
249 | if mac.is_derive_macro() { | 249 | // FIXME kind() doesn't check whether proc-macro is a derive |
250 | if mac.kind() == hir::MacroKind::Derive || mac.kind() == hir::MacroKind::ProcMacro { | ||
250 | result.insert(name.to_string()); | 251 | result.insert(name.to_string()); |
251 | } | 252 | } |
252 | } | 253 | } |