We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0389cc6 commit 1ac338cCopy full SHA for 1ac338c
src/librustc_driver/pretty.rs
@@ -696,13 +696,16 @@ impl fold::Folder for ReplaceBodyWithLoop {
696
697
fn print_flowgraph<'a, 'tcx, W: Write>(variants: Vec<borrowck_dot::Variant>,
698
tcx: TyCtxt<'a, 'tcx, 'tcx>,
699
- code: blocks::Code,
+ code: blocks::Code<'tcx>,
700
mode: PpFlowGraphMode,
701
mut out: W)
702
-> io::Result<()> {
703
let cfg = match code {
704
blocks::Code::Expr(expr) => cfg::CFG::new(tcx, expr),
705
- blocks::Code::FnLike(fn_like) => cfg::CFG::new(tcx, fn_like.body()),
+ blocks::Code::FnLike(fn_like) => {
706
+ let body = tcx.map.expr(fn_like.body());
707
+ cfg::CFG::new(tcx, body)
708
+ },
709
};
710
let labelled_edges = mode != PpFlowGraphMode::UnlabelledEdges;
711
let lcfg = LabelledCFG {
0 commit comments