Deduplicate supertrait_def_ids code
This commit is contained in:
parent
dd9c8cc467
commit
95e073234f
9 changed files with 22 additions and 65 deletions
|
@ -1004,7 +1004,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
let a_auto_traits: FxIndexSet<DefId> = a_data
|
||||
.auto_traits()
|
||||
.chain(principal_def_id_a.into_iter().flat_map(|principal_def_id| {
|
||||
util::supertrait_def_ids(self.tcx(), principal_def_id)
|
||||
self.tcx()
|
||||
.supertrait_def_ids(principal_def_id)
|
||||
.filter(|def_id| self.tcx().trait_is_auto(*def_id))
|
||||
}))
|
||||
.collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue