one macro def should be enough

This commit is contained in:
Aleksey Kladov 2019-06-08 14:48:56 +03:00
parent 2c28f5245d
commit 1b783e33e9
6 changed files with 25 additions and 33 deletions

View file

@ -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)

View file

@ -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),