From 1d6eef1350ee0793fcd2a0eb191cdb127b76a49d Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 11 Jun 2021 18:12:51 +0200 Subject: Update ungrammar --- crates/ide_db/src/defs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ide_db') 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 { } if let Some(resolved) = sema.resolve_path(&path) { - if path.syntax().parent().and_then(ast::Attr::cast).is_some() { + if path.syntax().ancestors().find_map(ast::Attr::cast).is_some() { if let PathResolution::Def(ModuleDef::Function(func)) = resolved { if func.attrs(sema.db).by_key("proc_macro_attribute").exists() { return Some(NameRefClass::Definition(resolved.into())); -- cgit v1.2.3