//! The various pretty-printing routines.
-use rustc::cfg;
-use rustc::cfg::graphviz::LabelledCFG;
use rustc::hir;
use rustc::hir::map as hir_map;
use rustc::hir::map::blocks;
use rustc_interface::util::ReplaceBodyWithLoop;
use rustc_ast_borrowck as borrowck;
use rustc_ast_borrowck::graphviz as borrowck_dot;
+use rustc_ast_borrowck::cfg::{self, graphviz::LabelledCFG};
use rustc_mir::util::{write_mir_pretty, write_mir_graphviz};
use syntax::ast;
suffix (b::c::d)");
let hir_id = tcx.hir().node_to_hir_id(nodeid);
let node = tcx.hir().find(hir_id).unwrap_or_else(|| {
- tcx.sess.fatal(&format!("--pretty flowgraph couldn't find id: {}", nodeid))
+ tcx.sess.fatal(&format!("`--pretty=flowgraph` couldn't find ID: {}", nodeid))
});
match blocks::Code::from_node(&tcx.hir(), hir_id) {
print_flowgraph(variants, tcx, code, mode, out)
}
None => {
- let message = format!("--pretty=flowgraph needs block, fn, or method; \
+ let message = format!("`--pretty=flowgraph` needs block, fn, or method; \
got {:?}",
node);