aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/defs.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-06-11 17:12:51 +0100
committerJonas Schievink <[email protected]>2021-06-11 17:34:30 +0100
commit1d6eef1350ee0793fcd2a0eb191cdb127b76a49d (patch)
tree6f3f37d7ac665a7b6b6325da0d3b411741cd7069 /crates/ide_db/src/defs.rs
parent80b3b740184a6a64ee0ff8767ab6f5b786dc0dd7 (diff)
Update ungrammar
Diffstat (limited to 'crates/ide_db/src/defs.rs')
-rw-r--r--crates/ide_db/src/defs.rs2
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()));