diff options
author | Aleksey Kladov <[email protected]> | 2019-06-08 12:48:56 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-06-08 12:48:56 +0100 |
commit | 1b783e33e953f2c63c96c1d7fa54d2e64fbd2d9a (patch) | |
tree | 391c4e4ca264830a19045b2016034bb1bdbb98d9 /crates/ra_ide_api | |
parent | 2c28f5245dd8ede715d99b55fdad0ceb3de9dbe7 (diff) |
one macro def should be enough
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/display/navigation_target.rs | 5 | ||||
-rw-r--r-- | crates/ra_ide_api/src/name_ref_kind.rs | 5 |
2 files changed, 4 insertions, 6 deletions
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 { | |||
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
241 | pub(crate) fn from_macro_def( | 241 | pub(crate) fn from_macro_def(db: &RootDatabase, macro_call: hir::MacroDef) -> NavigationTarget { |
242 | db: &RootDatabase, | ||
243 | macro_call: hir::MacroByExampleDef, | ||
244 | ) -> NavigationTarget { | ||
245 | let (file_id, node) = macro_call.source(db); | 242 | let (file_id, node) = macro_call.source(db); |
246 | log::debug!("nav target {}", node.syntax().debug_dump()); | 243 | log::debug!("nav target {}", node.syntax().debug_dump()); |
247 | NavigationTarget::from_named(file_id.original_file(db), &*node) | 244 | 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 @@ | |||
1 | use ra_syntax::{AstNode, AstPtr, ast}; | 1 | use ra_syntax::{AstNode, AstPtr, ast}; |
2 | use hir::Either; | 2 | use hir::Either; |
3 | use crate::db::RootDatabase; | ||
4 | use test_utils::tested_by; | 3 | use test_utils::tested_by; |
5 | 4 | ||
5 | use crate::db::RootDatabase; | ||
6 | |||
6 | pub enum NameRefKind { | 7 | pub enum NameRefKind { |
7 | Method(hir::Function), | 8 | Method(hir::Function), |
8 | Macro(hir::MacroByExampleDef), | 9 | Macro(hir::MacroDef), |
9 | FieldAccess(hir::StructField), | 10 | FieldAccess(hir::StructField), |
10 | AssocItem(hir::ImplItem), | 11 | AssocItem(hir::ImplItem), |
11 | Def(hir::ModuleDef), | 12 | Def(hir::ModuleDef), |