fn drop_halfladder<'a>(&mut self,
                           c: &DropCtxt<'a, 'tcx>,
                           unwind_ladder: Option<Vec<BasicBlock>>,
                           succ: BasicBlock,
                           fields: &[(Lvalue<'tcx>, Option<MovePathIndex>)],
                           is_cleanup: bool)
                           -> Vec<BasicBlock>
    {
        let mut succ = succ;
        let mut unwind_succ = if is_cleanup {
            None
        } else {
            c.unwind
        };
        let mut update_drop_flag = true;

        fields.iter().rev().enumerate().map(|(i, &(ref lv, path))| {
            let drop_block = match path {
                Some(path) => {
                    debug!("drop_ladder: for std field {} ({:?})", i, lv);

                    self.elaborated_drop_block(&DropCtxt {
                        source_info: c.source_info,
                        is_cleanup: is_cleanup,
                        init_data: c.init_data,
                        lvalue: lv,
                        path: path,
                        succ: succ,
                        unwind: unwind_succ,
                    })
                }
                None => {
                    debug!("drop_ladder: for rest field {} ({:?})", i, lv);

                    let blk = self.complete_drop(&DropCtxt {
                        source_info: c.source_info,
                        is_cleanup: is_cleanup,
                        init_data: c.init_data,
                        lvalue: lv,
                        path: c.path,
                        succ: succ,
                        unwind: unwind_succ,
                    }, update_drop_flag);

                    // the drop flag has been updated - updating
                    // it again would clobber it.
                    update_drop_flag = false;

                    blk
                }
            };

            succ = drop_block;
            unwind_succ = unwind_ladder.as_ref().map(|p| p[i]);

            drop_block
        }).collect()
    }
/// Create one-half of the drop ladder for a list of fields, and return
/// the list of steps in it in reverse order.
///
/// `unwind_ladder` is such a list of steps in reverse order,
/// which is called instead of the next step if the drop unwinds
/// (the first field is never reached). If it is `None`, all
/// unwind targets are left blank.
Create one-half of the drop ladder for a list of fields, and return
the list of steps in it in reverse order.

`unwind_ladder` is such a list of steps in reverse order,
which is called instead of the next step if the drop unwinds
(the first field is never reached). If it is `None`, all
unwind targets are left blank.
Create one - half of the drop ladder for a list of fields and return the list of steps in it in reverse order . ` unwind_ladder ` is such a list of steps in reverse order which is called instead of the next step if the drop unwinds ( the first field is never reached ) . If it is ` None ` all unwind targets are left blank .
fn drop_halfladder<'a>(&mut self,
                           c: &DropCtxt<'a, 'tcx>,
                           unwind_ladder: Option<Vec<BasicBlock>>,
                           succ: BasicBlock,
                           fields: &[(Lvalue<'tcx>, Option<MovePathIndex>)],
                           is_cleanup: bool)
                           -> Vec<BasicBlock>
    {
        let mut succ = succ;
        let mut unwind_succ = if is_cleanup {
            None
        } else {
            c.unwind
        };
        let mut update_drop_flag = true;
        fields.iter().rev().enumerate().map(|(i, &(ref lv, path))| {
            let drop_block = match path {
                Some(path) => {
                    debug!("drop_ladder: for std field {} ({:?})", i, lv);
                    self.elaborated_drop_block(&DropCtxt {
                        source_info: c.source_info,
                        is_cleanup: is_cleanup,
                        init_data: c.init_data,
                        lvalue: lv,
                        path: path,
                        succ: succ,
                        unwind: unwind_succ,
                    })
                }
                None => {
                    debug!("drop_ladder: for rest field {} ({:?})", i, lv);
                    let blk = self.complete_drop(&DropCtxt {
                        source_info: c.source_info,
                        is_cleanup: is_cleanup,
                        init_data: c.init_data,
                        lvalue: lv,
                        path: c.path,
                        succ: succ,
                        unwind: unwind_succ,
                    }, update_drop_flag);
                    // the drop flag has been updated - updating
                    // it again would clobber it.
                    update_drop_flag = false;
                    blk
                }
            };
            succ = drop_block;
            unwind_succ = unwind_ladder.as_ref().map(|p| p[i]);
            drop_block
        }).collect()
    }
fn drop_halfladder < ' a > ( & mut self , c : & DropCtxt < ' a , ' tcx > , unwind_ladder : Option < Vec < BasicBlock > > , succ : BasicBlock , fields : & [ ( Lvalue < ' tcx > , Option < MovePathIndex > ) ] , is_cleanup : bool ) -> Vec < BasicBlock > { let mut succ = succ ; let mut unwind_succ = if is_cleanup { None } else { c . unwind } ; let mut update_drop_flag = true ; fields . iter ( ) . rev ( ) . enumerate ( ) . map ( | ( i , & ( ref lv , path ) ) | { let drop_block = match path { Some ( path ) => { debug ! ( " " i lv ) ; self . elaborated_drop_block ( & DropCtxt { source_info : c . source_info , is_cleanup : is_cleanup , init_data : c . init_data , lvalue : lv , path : path , succ : succ , unwind : unwind_succ , } ) } None => { debug ! ( " " i lv ) ; let blk = self . complete_drop ( & DropCtxt { source_info : c . source_info , is_cleanup : is_cleanup , init_data : c . init_data , lvalue : lv , path : c . path , succ : succ , unwind : unwind_succ , } , update_drop_flag ) ; // the drop flag has been updated - updating // it again would clobber it. update_drop_flag = false ; blk } } ; succ = drop_block ; unwind_succ = unwind_ladder . as_ref ( ) . map ( | p | p [ i ] ) ; drop_block } ) . collect ( ) }
Create one-half of the drop ladder for a list of fields, and return
the list of steps in it in reverse order.
Create one - half of the drop ladder for a list of fields and return the list of steps in it in reverse order .
&mut self
c
&DropCtxt<'a, 'tcx>
unwind_ladder
Option<Vec<BasicBlock>>
succ
BasicBlock
fields
&[(Lvalue<'tcx>, Option<MovePathIndex>)]
is_cleanup
bool
&mut self
c
&DropCtxt<'a, 'tcx>
unwind_ladder
Option<Vec<BasicBlock>>
succ
BasicBlock
fields
&[(Lvalue<'tcx>, Option<MovePathIndex>)]
is_cleanup
bool