rustc_trait_selection::traits::dyn_compatibility

Function object_ty_for_trait

Source
fn object_ty_for_trait<'tcx>(
    tcx: TyCtxt<'tcx>,
    trait_def_id: DefId,
    lifetime: Region<'tcx>,
) -> Ty<'tcx>
Expand description

Creates the object type for the current trait. For example, if the current trait is Deref, then this will be dyn Deref<Target = Self::Target> + 'static.