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

@ -430,7 +430,7 @@ impl<'db> SemanticsImpl<'db> {
let macro_call = InFile::new(file_id, actual_macro_call);
let krate = resolver.krate();
let macro_call_id = macro_call.as_call_id(self.db.upcast(), krate, |path| {
resolver.resolve_path_as_macro_def(self.db.upcast(), &path, Some(MacroSubNs::Bang))
resolver.resolve_path_as_macro_def(self.db.upcast(), path, Some(MacroSubNs::Bang))
})?;
hir_expand::db::expand_speculative(
self.db.upcast(),