internal: Cleanup Expander a bit

This commit is contained in:
Lukas Wirth 2023-12-22 12:46:22 +01:00
parent 2a5b60b186
commit 9d24764624
7 changed files with 68 additions and 91 deletions

View file

@ -340,9 +340,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(self.db.upcast(), &path, Some(MacroSubNs::Bang))
.map(|(it, _)| self.db.macro_def(it))
resolver.resolve_path_as_macro_def(self.db.upcast(), &path, Some(MacroSubNs::Bang))
})?;
hir_expand::db::expand_speculative(
self.db.upcast(),