Auto merge of #17405 - Veykril:modpath-clone, r=Veykril

internal: Don't unnecessarily clone ModPaths in early name res
This commit is contained in:
bors 2024-06-12 09:27:49 +00:00
commit 22648b2655
12 changed files with 29 additions and 30 deletions

View file

@ -416,9 +416,9 @@ impl<'a> TyLoweringContext<'a> {
};
let ty = {
let macro_call = macro_call.to_node(self.db.upcast());
let resolver = |path| {
let resolver = |path: &_| {
self.resolver
.resolve_path_as_macro(self.db.upcast(), &path, Some(MacroSubNs::Bang))
.resolve_path_as_macro(self.db.upcast(), path, Some(MacroSubNs::Bang))
.map(|(it, _)| it)
};
match expander.enter_expand::<ast::Type>(self.db.upcast(), macro_call, resolver)