aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-11 17:35:38 +0100
committerGitHub <[email protected]>2021-06-11 17:35:38 +0100
commit6ac3e666b7c62a9097d10c52636cfe75e7851806 (patch)
treeb1e4ab548d425287b2e5c74bbb16f8ce0da96e97 /crates/ide_db/src
parent5f69420ee3317f9c0e3cb774ccc0cb0e64af0b9a (diff)
parent99d40e7a3a22604690753322f9274bc91fa03de4 (diff)
Merge #9217
9217: internal: Don't stringify and reparse `cfg_attr`-gated attributes r=jonas-schievink a=jonas-schievink Bumps ungrammar to include https://github.com/rust-analyzer/ungrammar/pull/33 bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ide_db/src')
-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()));