/// The slow-path - create an "open", elaborated drop for a type
/// which is moved-out-of only partially, and patch `bb` to a jump
/// to it. This must not be called on ADTs with a destructor,
/// as these can't be moved-out-of, except for `Box<T>`, which is
/// special-cased.
///
/// This creates a "drop ladder" that drops the needed fields of the
/// ADT, both in the success case or if one of the destructors fail.
The slow-path - create an "open", elaborated drop for a type
which is moved-out-of only partially, and patch `bb` to a jump
to it. This must not be called on ADTs with a destructor,
as these can't be moved-out-of, except for `Box`, which is
special-cased.

This creates a "drop ladder" that drops the needed fields of the
ADT, both in the success case or if one of the destructors fail.
The slow - path - create an " open " elaborated drop for a type which is moved - out - of only partially and patch ` bb ` to a jump to it . This must not be called on ADTs with a destructor as these can ' t be moved - out - of except for ` Box ` which is special - cased . This creates a " drop ladder " that drops the needed fields of the ADT both in the success case or if one of the destructors fail .
fn open_drop<'a>(&mut self, c: &DropCtxt<'a, 'tcx>) -> BasicBlock {
        let ty = self.mir.lvalue_ty(self.tcx, c.lvalue).to_ty(self.tcx);
        match ty.sty {
            ty::TyStruct(def, substs) | ty::TyEnum(def, substs) => {
                self.open_drop_for_adt(c, def, substs)
            }
            ty::TyTuple(tys) | ty::TyClosure(_, ty::ClosureSubsts {
                upvar_tys: tys, ..
            }) => {
                self.open_drop_for_tuple(c, tys)
            }
            ty::TyBox(ty) => {
                self.open_drop_for_box(c, ty)
            }
            _ => bug!("open drop from non-ADT `{:?}`", ty)
        }
    }
fn open_drop < ' a > ( & mut self , c : & DropCtxt < ' a , ' tcx > ) -> BasicBlock { let ty = self . mir . lvalue_ty ( self . tcx , c . lvalue ) . to_ty ( self . tcx ) ; match ty . sty { ty :: TyStruct ( def , substs ) | ty :: TyEnum ( def , substs ) => { self . open_drop_for_adt ( c , def , substs ) } ty :: TyTuple ( tys ) | ty :: TyClosure ( _ , ty :: ClosureSubsts { upvar_tys : tys , .. } ) => { self . open_drop_for_tuple ( c , tys ) } ty :: TyBox ( ty ) => { self . open_drop_for_box ( c , ty ) } _ => bug ! ( " " ty ) } }
The slow-path - create an "open", elaborated drop for a type
which is moved-out-of only partially, and patch `bb` to a jump
to it.
The slow - path - create an " open " elaborated drop for a type which is moved - out - of only partially and patch ` bb ` to a jump to it .
&mut self
c
&DropCtxt<'a, 'tcx>