mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Move ide crates to new hir::Macro
This commit is contained in:
parent
c04b0f435b
commit
eba90936c1
24 changed files with 61 additions and 67 deletions
|
@ -211,6 +211,7 @@ impl TryToNav for hir::ModuleDef {
|
|||
hir::ModuleDef::Static(it) => it.try_to_nav(db),
|
||||
hir::ModuleDef::Trait(it) => it.try_to_nav(db),
|
||||
hir::ModuleDef::TypeAlias(it) => it.try_to_nav(db),
|
||||
hir::ModuleDef::Macro(it) => it.try_to_nav(db),
|
||||
hir::ModuleDef::BuiltinType(_) => None,
|
||||
}
|
||||
}
|
||||
|
@ -332,7 +333,7 @@ impl TryToNav for hir::Field {
|
|||
}
|
||||
}
|
||||
|
||||
impl TryToNav for hir::MacroDef {
|
||||
impl TryToNav for hir::Macro {
|
||||
fn try_to_nav(&self, db: &RootDatabase) -> Option<NavigationTarget> {
|
||||
let src = self.source(db)?;
|
||||
let name_owner: &dyn ast::HasName = match &src.value {
|
||||
|
@ -343,7 +344,7 @@ impl TryToNav for hir::MacroDef {
|
|||
let mut res = NavigationTarget::from_named(
|
||||
db,
|
||||
src.as_ref().with_value(name_owner),
|
||||
self.kind().into(),
|
||||
self.kind(db).into(),
|
||||
);
|
||||
res.docs = self.docs(db);
|
||||
Some(res)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue