mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Rename some things and turn macro to macro def into a query
This commit is contained in:
parent
071fe4e4e9
commit
51a9e7831a
21 changed files with 165 additions and 163 deletions
|
@ -11,8 +11,8 @@ use limit::Limit;
|
|||
use syntax::{ast, Parse, SyntaxNode};
|
||||
|
||||
use crate::{
|
||||
attr::Attrs, db::DefDatabase, lower::LowerCtx, macro_id_to_def_id, path::Path, AsMacroCall,
|
||||
MacroId, ModuleId, UnresolvedMacro,
|
||||
attr::Attrs, db::DefDatabase, lower::LowerCtx, path::Path, AsMacroCall, MacroId, ModuleId,
|
||||
UnresolvedMacro,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -58,7 +58,7 @@ impl Expander {
|
|||
let result = self.within_limit(db, |this| {
|
||||
let macro_call = InFile::new(this.current_file_id, ¯o_call);
|
||||
match macro_call.as_call_id_with_errors(db.upcast(), this.module.krate(), |path| {
|
||||
resolver(path).map(|it| macro_id_to_def_id(db, it))
|
||||
resolver(path).map(|it| db.macro_def(it))
|
||||
}) {
|
||||
Ok(call_id) => call_id,
|
||||
Err(resolve_err) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue