Skip to content

Commit

Permalink
rustc_driver: fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
flodiebold committed Nov 29, 2016
1 parent 0389cc6 commit 1ac338c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/librustc_driver/pretty.rs
Expand Up @@ -696,13 +696,16 @@ impl fold::Folder for ReplaceBodyWithLoop {

fn print_flowgraph<'a, 'tcx, W: Write>(variants: Vec<borrowck_dot::Variant>,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
code: blocks::Code,
code: blocks::Code<'tcx>,
mode: PpFlowGraphMode,
mut out: W)
-> io::Result<()> {
let cfg = match code {
blocks::Code::Expr(expr) => cfg::CFG::new(tcx, expr),
blocks::Code::FnLike(fn_like) => cfg::CFG::new(tcx, fn_like.body()),
blocks::Code::FnLike(fn_like) => {
let body = tcx.map.expr(fn_like.body());
cfg::CFG::new(tcx, body)
},
};
let labelled_edges = mode != PpFlowGraphMode::UnlabelledEdges;
let lcfg = LabelledCFG {
Expand Down

0 comments on commit 1ac338c

Please sign in to comment.