# Function rustc_middle::traits::util::supertraits_for_pretty_printing

source ·

    pub fn supertraits_for_pretty_printing<'tcx>(
        tcx: TyCtxt<'tcx>,
        trait_ref: PolyTraitRef<'tcx>
    ) -> impl Iterator<Item = PolyTraitRef<'tcx>>

Expand description

Given a PolyTraitRef, get the PolyTraitRefs of the trait’s (transitive) supertraits. This only exists in `rustc_middle` because the more powerful elaborator depends on `rustc_infer` for elaborating outlives bounds – this should only be used for pretty printing.