Function rustc_mir_transform::simplify_try::try_eat
source · fn try_eat<'a, 'tcx>(
stmt_iter: &mut Peekable<Enumerate<Iter<'a, Statement<'tcx>>>>,
test: impl Fn(&'a Statement<'tcx>) -> bool,
action: impl FnMut(usize, &'a Statement<'tcx>)
)Expand description
Eats consecutive Statements which match test, performing the specified action for each.
The iterator stmt_iter is not advanced if none were matched.