internal: Don't unnecessarily clone ModPaths in early name res

This commit is contained in:
Lukas Wirth 2024-06-12 11:25:19 +02:00
parent 72dfbe95de
commit 855282fa53
12 changed files with 29 additions and 30 deletions

View file

@ -826,7 +826,7 @@ impl SourceAnalyzer {
// FIXME: This causes us to parse, generally this is the wrong approach for resolving a
// macro call to a macro call id!
let macro_call_id = macro_call.as_call_id(db.upcast(), krate, |path| {
self.resolver.resolve_path_as_macro_def(db.upcast(), &path, Some(MacroSubNs::Bang))
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)