Trait BoundVarReplacerDelegate

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

Source

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

Source

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

Implementors§

Source§

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