1
Fork 0

Avoid going through queries if a value of type AssocItem is already available

This commit is contained in:
Oli Scherer 2023-06-05 14:22:45 +00:00
parent 42f28f9eb4
commit 604ffab063
4 changed files with 5 additions and 5 deletions

View file

@ -1601,7 +1601,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
tcx.associated_items(pred.def_id())
.in_definition_order()
.filter(|item| item.kind == ty::AssocKind::Type)
.filter(|item| tcx.opt_rpitit_info(item.def_id).is_none())
.filter(|item| item.opt_rpitit_info.is_none())
.map(|item| item.def_id),
);
}