diff options
Diffstat (limited to 'crates/ide_db')
-rw-r--r-- | crates/ide_db/src/defs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_db/src/defs.rs b/crates/ide_db/src/defs.rs index 1b69d72f9..a54f2c323 100644 --- a/crates/ide_db/src/defs.rs +++ b/crates/ide_db/src/defs.rs | |||
@@ -369,7 +369,7 @@ impl NameRefClass { | |||
369 | } | 369 | } |
370 | 370 | ||
371 | if let Some(resolved) = sema.resolve_path(&path) { | 371 | if let Some(resolved) = sema.resolve_path(&path) { |
372 | if path.syntax().parent().and_then(ast::Attr::cast).is_some() { | 372 | if path.syntax().ancestors().find_map(ast::Attr::cast).is_some() { |
373 | if let PathResolution::Def(ModuleDef::Function(func)) = resolved { | 373 | if let PathResolution::Def(ModuleDef::Function(func)) = resolved { |
374 | if func.attrs(sema.db).by_key("proc_macro_attribute").exists() { | 374 | if func.attrs(sema.db).by_key("proc_macro_attribute").exists() { |
375 | return Some(NameRefClass::Definition(resolved.into())); | 375 | return Some(NameRefClass::Definition(resolved.into())); |