Trait rustc_infer::infer::relate::Relate

source ·
pub trait Relate<I>:
    TypeFoldable<I>
    + PartialEq
    + Copy
where I: Interner,
{ // Required method fn relate<R>( relation: &mut R, a: Self, b: Self, ) -> Result<Self, TypeError<I>> where R: TypeRelation<I>; }

Required Methods§

source

fn relate<R>(relation: &mut R, a: Self, b: Self) -> Result<Self, TypeError<I>>
where R: TypeRelation<I>,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for Safety

source§

fn relate<R>( _relation: &mut R, a: Safety, b: Safety, ) -> Result<Safety, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for ImplSubject<'tcx>

source§

fn relate<R>( relation: &mut R, a: ImplSubject<'tcx>, b: ImplSubject<'tcx>, ) -> Result<ImplSubject<'tcx>, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for Abi

source§

fn relate<R>( _relation: &mut R, a: Abi, b: Abi, ) -> Result<Abi, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for Expr<'tcx>

source§

fn relate<R>( relation: &mut R, ae: Expr<'tcx>, be: Expr<'tcx>, ) -> Result<Expr<'tcx>, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for Const<'tcx>

source§

fn relate<R>( relation: &mut R, a: Const<'tcx>, b: Const<'tcx>, ) -> Result<Const<'tcx>, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for GenericArg<'tcx>

source§

fn relate<R>( relation: &mut R, a: GenericArg<'tcx>, b: GenericArg<'tcx>, ) -> Result<GenericArg<'tcx>, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for Pattern<'tcx>

source§

fn relate<R>( relation: &mut R, a: Pattern<'tcx>, b: Pattern<'tcx>, ) -> Result<Pattern<'tcx>, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for Region<'tcx>

source§

fn relate<R>( relation: &mut R, a: Region<'tcx>, b: Region<'tcx>, ) -> Result<Region<'tcx>, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for Term<'tcx>

source§

fn relate<R>( relation: &mut R, a: Term<'tcx>, b: Term<'tcx>, ) -> Result<Term<'tcx>, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

source§

impl<'tcx> Relate<TyCtxt<'tcx>> for Ty<'tcx>

source§

fn relate<R>( relation: &mut R, a: Ty<'tcx>, b: Ty<'tcx>, ) -> Result<Ty<'tcx>, TypeError<TyCtxt<'tcx>>>
where R: TypeRelation<TyCtxt<'tcx>>,

Implementors§

source§

impl<I> Relate<I> for BoundConstness
where I: Interner,

source§

impl<I> Relate<I> for PredicatePolarity
where I: Interner,

source§

impl<I> Relate<I> for AliasTerm<I>
where I: Interner,

source§

impl<I> Relate<I> for AliasTy<I>
where I: Interner,

source§

impl<I> Relate<I> for ExistentialProjection<I>
where I: Interner,

source§

impl<I> Relate<I> for ExistentialTraitRef<I>
where I: Interner,

source§

impl<I> Relate<I> for FnSig<I>
where I: Interner,

source§

impl<I> Relate<I> for TraitPredicate<I>
where I: Interner,

source§

impl<I> Relate<I> for TraitRef<I>
where I: Interner,

source§

impl<I, T> Relate<I> for Binder<I, T>
where I: Interner, T: Relate<I>,