fn dynify<T: TyVisitable>(x: T, new_self: Option<Ty>) -> T
Expand description
Takes a T
valid in the context of a trait ref and transforms it into a T
valid in the
context of its vtable definition, i.e. no longer mentions Self
. If new_self
is Some
, we
replace any mention of Self
with it; otherwise we panic if Self
is mentioned.