}
}
+fn associated_items<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx [ty::AssocItem] {
+ tcx.arena.alloc_from_iter(
+ tcx.associated_item_def_ids(def_id).iter().map(|did| tcx.associated_item(*did)),
+ )
+}
+
fn def_span(tcx: TyCtxt<'_>, def_id: DefId) -> Span {
tcx.hir().span_if_local(def_id).unwrap()
}
}
// Compute the bounds on Self and the type parameters.
- let ty::InstantiatedPredicates { predicates } =
+ let ty::InstantiatedPredicates { predicates, .. } =
tcx.predicates_of(def_id).instantiate_identity(tcx);
// Finally, we have to normalize the bounds in the environment, in
asyncness,
associated_item,
associated_item_def_ids,
+ associated_items,
adt_sized_constraint,
def_span,
param_env,