Migrate predicates_of and caller_bounds to Clause
This commit is contained in:
@@ -125,7 +125,7 @@ impl<'tcx> TraitAliasExpander<'tcx> {
|
||||
|
||||
let items = predicates.predicates.iter().rev().filter_map(|(pred, span)| {
|
||||
pred.subst_supertrait(tcx, &trait_ref)
|
||||
.to_opt_poly_trait_pred()
|
||||
.as_trait_clause()
|
||||
.map(|trait_ref| item.clone_and_push(trait_ref.map_bound(|t| t.trait_ref), *span))
|
||||
});
|
||||
debug!("expand_trait_aliases: items={:?}", items.clone().collect::<Vec<_>>());
|
||||
@@ -182,7 +182,7 @@ impl Iterator for SupertraitDefIds<'_> {
|
||||
predicates
|
||||
.predicates
|
||||
.iter()
|
||||
.filter_map(|(pred, _)| pred.to_opt_poly_trait_pred())
|
||||
.filter_map(|(pred, _)| pred.as_trait_clause())
|
||||
.map(|trait_ref| trait_ref.def_id())
|
||||
.filter(|&super_def_id| visited.insert(super_def_id)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user