rustc_infer::infer::canonical::ir

Trait UpcastFrom

pub trait UpcastFrom<I, T> {
    // Required method
    fn upcast_from(from: T, interner: I) -> Self;
}
Expand description

A From-like trait that takes TyCtxt to perform interner-specific transformations.

Required Methods§

fn upcast_from(from: T, interner: I) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, ClauseKind<TyCtxt<'tcx>>> for Clause<'tcx>

Source§

fn upcast_from( from: ClauseKind<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Clause<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, ClauseKind<TyCtxt<'tcx>>> for Predicate<'tcx>

Source§

fn upcast_from( from: ClauseKind<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, PredicateKind<TyCtxt<'tcx>>> for Predicate<'tcx>

Source§

fn upcast_from( from: PredicateKind<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Clause<'tcx>> for Predicate<'tcx>

Source§

fn upcast_from(from: Clause<'tcx>, _tcx: TyCtxt<'tcx>) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, ClauseKind<TyCtxt<'tcx>>>> for Clause<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, ClauseKind<TyCtxt<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Clause<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, ClauseKind<TyCtxt<'tcx>>>> for Predicate<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, ClauseKind<TyCtxt<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, PredicateKind<TyCtxt<'tcx>>>> for Predicate<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, PredicateKind<TyCtxt<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, OutlivesPredicate<TyCtxt<'tcx>, Region<'tcx>>>> for Predicate<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, OutlivesPredicate<TyCtxt<'tcx>, Region<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, ProjectionPredicate<TyCtxt<'tcx>>>> for Clause<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, ProjectionPredicate<TyCtxt<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Clause<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, ProjectionPredicate<TyCtxt<'tcx>>>> for Predicate<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, ProjectionPredicate<TyCtxt<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, TraitPredicate<TyCtxt<'tcx>>>> for Clause<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, TraitPredicate<TyCtxt<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Clause<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, TraitPredicate<TyCtxt<'tcx>>>> for Predicate<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, TraitPredicate<TyCtxt<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>>> for Clause<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Clause<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>>> for Predicate<'tcx>

Source§

fn upcast_from( from: Binder<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, NormalizesTo<TyCtxt<'tcx>>> for Predicate<'tcx>

Source§

fn upcast_from( from: NormalizesTo<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, OutlivesPredicate<TyCtxt<'tcx>, Region<'tcx>>> for Predicate<'tcx>

Source§

fn upcast_from( from: OutlivesPredicate<TyCtxt<'tcx>, Region<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, OutlivesPredicate<TyCtxt<'tcx>, Ty<'tcx>>> for Predicate<'tcx>

Source§

fn upcast_from( from: OutlivesPredicate<TyCtxt<'tcx>, Ty<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, ProjectionPredicate<TyCtxt<'tcx>>> for Clause<'tcx>

Source§

fn upcast_from( from: ProjectionPredicate<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Clause<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, ProjectionPredicate<TyCtxt<'tcx>>> for Predicate<'tcx>

Source§

fn upcast_from( from: ProjectionPredicate<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, TraitPredicate<TyCtxt<'tcx>>> for Clause<'tcx>

Source§

fn upcast_from( from: TraitPredicate<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Clause<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, TraitPredicate<TyCtxt<'tcx>>> for Predicate<'tcx>

Source§

fn upcast_from( from: TraitPredicate<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>> for Clause<'tcx>

Source§

fn upcast_from(from: TraitRef<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>) -> Clause<'tcx>

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>> for Predicate<'tcx>

Source§

fn upcast_from( from: TraitRef<TyCtxt<'tcx>>, tcx: TyCtxt<'tcx>, ) -> Predicate<'tcx>

Implementors§

Source§

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>>> for Binder<TyCtxt<'tcx>, TraitPredicate<TyCtxt<'tcx>>>

§

impl<I> UpcastFrom<I, TraitRef<I>> for TraitPredicate<I>
where I: Interner,

§

impl<I, T> UpcastFrom<I, T> for T