Skip to main content

BinderVariances

Trait BinderVariances 

Source
trait BinderVariances<'tcx>: Sized {
    // Provided method
    fn variances(
        _tcx: TyCtxt<'tcx>,
        _binder: &Binder<'tcx, Self>,
    ) -> HashMap<BoundVar, Variance> { ... }
}
Expand description

Lets types declare how to compute the variance of bound parameters.

Provided Methods§

Source

fn variances( _tcx: TyCtxt<'tcx>, _binder: &Binder<'tcx, Self>, ) -> HashMap<BoundVar, Variance>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'tcx> BinderVariances<'tcx> for ClauseKind<'tcx>

Source§

impl<'tcx> BinderVariances<'tcx> for FnSig<'tcx>

Source§

fn variances( tcx: TyCtxt<'tcx>, binder: &Binder<'tcx, Self>, ) -> HashMap<BoundVar, Variance>

Source§

impl<'tcx> BinderVariances<'tcx> for PredicateKind<'tcx>

Source§

impl<'tcx> BinderVariances<'tcx> for TraitPredicate<'tcx>

Source§

impl<'tcx> BinderVariances<'tcx> for TraitRef<'tcx>

Implementors§