mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
one macro def should be enough
This commit is contained in:
parent
2c28f5245d
commit
1b783e33e9
6 changed files with 25 additions and 33 deletions
|
@ -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)
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue