mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Improve goto definition for MBE
This commit is contained in:
parent
6c1ec865fb
commit
371961be0e
6 changed files with 55 additions and 9 deletions
|
@ -130,9 +130,13 @@ impl Resolver {
|
|||
resolution
|
||||
}
|
||||
|
||||
pub(crate) fn resolve_macro_call(&self, path: Option<Path>) -> Option<MacroDefId> {
|
||||
let name = path.and_then(|path| path.expand_macro_expr()).unwrap_or_else(Name::missing);
|
||||
self.module()?.0.find_macro(&name)
|
||||
pub(crate) fn resolve_macro_call(
|
||||
&self,
|
||||
db: &impl HirDatabase,
|
||||
path: Option<Path>,
|
||||
) -> Option<MacroDefId> {
|
||||
let m = self.module()?;
|
||||
m.0.find_macro(db, m.1, &path?)
|
||||
}
|
||||
|
||||
/// Returns the resolved path segments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue