Skip to main content

## BoundVarReplacerDelegate

# Trait BoundVarReplacerDelegate

Source

    pub trait BoundVarReplacerDelegate<'tcx> {
        // Required methods
        fn replace_region(&mut self, br: BoundRegion<'tcx>) -> Region<'tcx>;
        fn replace_ty(&mut self, bt: BoundTy<'tcx>) -> Ty<'tcx>;
        fn replace_const(&mut self, bc: BoundConst<'tcx>) -> Const<'tcx>;
    }

Expand description

A delegate used when instantiating bound vars.

Any implementation must make sure that each bound variable always gets mapped to the same result. `BoundVarReplacer` caches by using a `DelayedMap` which does not cache the first few types it encounters.

## Required Methods§

Source

#### fn replace_region(&mut self, br: BoundRegion<'tcx>) -> Region<'tcx>

Source

#### fn replace_ty(&mut self, bt: BoundTy<'tcx>) -> Ty<'tcx>

Source

#### fn replace_const(&mut self, bc: BoundConst<'tcx>) -> Const<'tcx>

## Dyn Compatibility§

This trait is dyn compatible.

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

## Implementors§

Source§

### impl<'a, 'tcx> BoundVarReplacerDelegate<'tcx> for FnMutDelegate<'a, 'tcx>