Function rustc_trans::trans::meth::trans_trait_castExperimental
[-]
[+]
[src]
pub fn trans_trait_cast<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, datum: Datum<'tcx, Expr>, id: NodeId, trait_ref: Rc<TraitRef<'tcx>>, dest: Dest) -> Block<'blk, 'tcx>
Generates the code to convert from a pointer (Box<T>, &T, etc)
into an object (Box<Trait>, &Trait, etc). This means creating a
pair where the first word is the vtable and the second word is
the pointer.