internal: Don't unnecessarily clone ModPaths out of interning wrappers

This commit is contained in:
Lukas Wirth 2024-06-12 11:43:36 +02:00
parent 855282fa53
commit ba543f7d76
4 changed files with 41 additions and 19 deletions

View file

@ -628,7 +628,7 @@ impl<'a> AssocItemCollector<'a> {
'attrs: for attr in &*attrs {
let ast_id =
AstId::new(self.expander.current_file_id(), item.ast_id(item_tree).upcast());
let ast_id_with_path = AstIdWithPath { path: (*attr.path).clone(), ast_id };
let ast_id_with_path = AstIdWithPath { path: attr.path.clone(), ast_id };
match self.def_map.resolve_attr_macro(
self.db,