(&mut iter) -> iter.by_ref()

This commit is contained in:
Maybe Waffle 2023-09-28 22:30:31 +00:00
parent fb0e58596f
commit 0d8a45813c

View file

@ -237,7 +237,7 @@ pub fn reachable<'a, 'tcx>(
/// Returns a `BitSet` containing all basic blocks reachable from the `START_BLOCK`.
pub fn reachable_as_bitset(body: &Body<'_>) -> BitSet<BasicBlock> {
let mut iter = preorder(body);
(&mut iter).for_each(drop);
iter.by_ref().for_each(drop);
iter.visited
}