rustc_middle::ty::fold

Trait BoundVarReplacerDelegate

source
pub trait BoundVarReplacerDelegate<'tcx> {
    // Required methods
    fn replace_region(&mut self, br: BoundRegion) -> Region<'tcx>;
    fn replace_ty(&mut self, bt: BoundTy) -> Ty<'tcx>;
    fn replace_const(&mut self, bv: BoundVar) -> 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) -> Region<'tcx>

source

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

source

fn replace_const(&mut self, bv: BoundVar) -> Const<'tcx>

Implementors§

source§

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