mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
internal: Cleanup Expander a bit
This commit is contained in:
parent
2a5b60b186
commit
9d24764624
7 changed files with 68 additions and 91 deletions
|
|
@ -770,9 +770,7 @@ impl SourceAnalyzer {
|
|||
) -> Option<MacroFileId> {
|
||||
let krate = self.resolver.krate();
|
||||
let macro_call_id = macro_call.as_call_id(db.upcast(), krate, |path| {
|
||||
self.resolver
|
||||
.resolve_path_as_macro(db.upcast(), &path, Some(MacroSubNs::Bang))
|
||||
.map(|(it, _)| db.macro_def(it))
|
||||
self.resolver.resolve_path_as_macro_def(db.upcast(), &path, Some(MacroSubNs::Bang))
|
||||
})?;
|
||||
// why the 64?
|
||||
Some(macro_call_id.as_macro_file()).filter(|it| it.expansion_level(db.upcast()) < 64)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue