Deduplicate supertrait_def_ids code
This commit is contained in:
parent
dd9c8cc467
commit
95e073234f
9 changed files with 22 additions and 65 deletions
|
|
@ -253,7 +253,7 @@ fn check_trait_items(cx: &LateContext<'_>, visited_trait: &Item<'_>, trait_items
|
|||
// fill the set with current and super traits
|
||||
fn fill_trait_set(traitt: DefId, set: &mut DefIdSet, cx: &LateContext<'_>) {
|
||||
if set.insert(traitt) {
|
||||
for supertrait in rustc_trait_selection::traits::supertrait_def_ids(cx.tcx, traitt) {
|
||||
for supertrait in cx.tcx.supertrait_def_ids(traitt) {
|
||||
fill_trait_set(supertrait, set, cx);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue