Avoid going through queries if a value of type AssocItem is already available
This commit is contained in:
@@ -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),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user