1
Fork 0

Auto merge of #108075 - WaffleLapkin:de-arena-allocates-you-OwO, r=Nilstrieb

Remove `arena_cache` modifier from `associated_item` query & copy `ty::AssocItem` instead of passing by ref

r? `@ghost`
This commit is contained in:
bors 2023-02-17 17:42:51 +00:00
commit 9aa5c24b7d
18 changed files with 93 additions and 101 deletions

View file

@ -26,7 +26,7 @@ fn associated_item_def_ids(tcx: TyCtxt<'_>, def_id: DefId) -> &[DefId] {
}
}
fn associated_items(tcx: TyCtxt<'_>, def_id: DefId) -> ty::AssocItems<'_> {
fn associated_items(tcx: TyCtxt<'_>, def_id: DefId) -> ty::AssocItems {
if tcx.is_trait_alias(def_id) {
ty::AssocItems::new(Vec::new())
} else {