rustc_trait_selection::traits::util

Function upcast_choices

Source
pub fn upcast_choices<'tcx>(
    tcx: TyCtxt<'tcx>,
    source_trait_ref: PolyTraitRef<'tcx>,
    target_trait_def_id: DefId,
) -> Vec<PolyTraitRef<'tcx>>
Expand description

Casts a trait reference into a reference to one of its super traits; returns None if target_trait_def_id is not a supertrait.