mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Cleanup some inert attribute stuff
This commit is contained in:
parent
09d7dcc143
commit
6f0207d594
17 changed files with 155 additions and 162 deletions
|
@ -1617,17 +1617,9 @@ fn macro_call_to_macro_id(
|
|||
macro_call_id: MacroCallId,
|
||||
) -> Option<MacroId> {
|
||||
let loc = db.lookup_intern_macro_call(macro_call_id);
|
||||
match loc.def.kind {
|
||||
hir_expand::MacroDefKind::Declarative(it)
|
||||
| hir_expand::MacroDefKind::BuiltIn(_, it)
|
||||
| hir_expand::MacroDefKind::BuiltInAttr(_, it)
|
||||
| hir_expand::MacroDefKind::BuiltInDerive(_, it)
|
||||
| hir_expand::MacroDefKind::BuiltInEager(_, it) => {
|
||||
ctx.macro_to_def(InFile::new(it.file_id, it.to_node(db)))
|
||||
}
|
||||
hir_expand::MacroDefKind::ProcMacro(_, _, it) => {
|
||||
ctx.proc_macro_to_def(InFile::new(it.file_id, it.to_node(db)))
|
||||
}
|
||||
match loc.def.ast_id() {
|
||||
Either::Left(it) => ctx.macro_to_def(InFile::new(it.file_id, it.to_node(db))),
|
||||
Either::Right(it) => ctx.proc_macro_to_def(InFile::new(it.file_id, it.to_node(db))),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue