mirror of
https://github.com/rust-lang/rust
synced 2024-10-20 23:44:13 +00:00
Rollup merge of #93631 - notriddle:notriddle/cleanup-some-into-iter, r=oli-obk
rustc_mir_dataflow: use iter::once instead of Some().into_iter
This commit is contained in:
commit
4b7035918c
|
@ -8,7 +8,7 @@
|
|||
use rustc_middle::ty::util::IntTypeExt;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_target::abi::VariantIdx;
|
||||
use std::fmt;
|
||||
use std::{fmt, iter};
|
||||
|
||||
/// The value of an inserted drop flag.
|
||||
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||
|
@ -329,8 +329,7 @@ fn drop_halfladder(
|
|||
mut succ: BasicBlock,
|
||||
fields: &[(Place<'tcx>, Option<D::Path>)],
|
||||
) -> Vec<BasicBlock> {
|
||||
Some(succ)
|
||||
.into_iter()
|
||||
iter::once(succ)
|
||||
.chain(fields.iter().rev().zip(unwind_ladder).map(|(&(place, path), &unwind_succ)| {
|
||||
succ = self.drop_subpath(place, path, succ, unwind_succ);
|
||||
succ
|
||||
|
|
Loading…
Reference in a new issue