From 1b783e33e953f2c63c96c1d7fa54d2e64fbd2d9a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 8 Jun 2019 14:48:56 +0300 Subject: one macro def should be enough --- crates/ra_ide_api/src/display/navigation_target.rs | 5 +---- crates/ra_ide_api/src/name_ref_kind.rs | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs index e19c071b0..45002d098 100644 --- a/crates/ra_ide_api/src/display/navigation_target.rs +++ b/crates/ra_ide_api/src/display/navigation_target.rs @@ -238,10 +238,7 @@ impl NavigationTarget { } } - pub(crate) fn from_macro_def( - db: &RootDatabase, - macro_call: hir::MacroByExampleDef, - ) -> NavigationTarget { + pub(crate) fn from_macro_def(db: &RootDatabase, macro_call: hir::MacroDef) -> NavigationTarget { let (file_id, node) = macro_call.source(db); log::debug!("nav target {}", node.syntax().debug_dump()); NavigationTarget::from_named(file_id.original_file(db), &*node) diff --git a/crates/ra_ide_api/src/name_ref_kind.rs b/crates/ra_ide_api/src/name_ref_kind.rs index 90972bc58..000036db4 100644 --- a/crates/ra_ide_api/src/name_ref_kind.rs +++ b/crates/ra_ide_api/src/name_ref_kind.rs @@ -1,11 +1,12 @@ use ra_syntax::{AstNode, AstPtr, ast}; use hir::Either; -use crate::db::RootDatabase; use test_utils::tested_by; +use crate::db::RootDatabase; + pub enum NameRefKind { Method(hir::Function), - Macro(hir::MacroByExampleDef), + Macro(hir::MacroDef), FieldAccess(hir::StructField), AssocItem(hir::ImplItem), Def(hir::ModuleDef), -- cgit v1.2.3