(domtree: &DominatorTree, block: Block)
| 179 | } |
| 180 | |
| 181 | fn fmt_block(domtree: &DominatorTree, block: Block) -> impl core::fmt::Debug { |
| 182 | core::fmt::from_fn(move |f| { |
| 183 | let children = domtree |
| 184 | .children(block) |
| 185 | .map(|c| fmt_block(domtree, c)) |
| 186 | .collect::<Vec<_>>(); |
| 187 | let mut s = f.debug_tuple(&format!("{block}")); |
| 188 | if !children.is_empty() { |
| 189 | s.field(&children); |
| 190 | } |
| 191 | s.finish() |
| 192 | }) |
| 193 | } |
| 194 | |
| 195 | s.field(&fmt_block(self, root)); |
| 196 | } |