]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_driver/pretty.rs
Move the HIR cfg to `rustc_ast_borrowck`
[rust.git] / src / librustc_driver / pretty.rs
index af0003760443085bae3a5eef048943eb17156ee0..c4d3ad946f9f6ffe5481ff6999f61fe29e2bb49c 100644 (file)
@@ -1,7 +1,5 @@
 //! 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;
@@ -14,6 +12,7 @@
 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;
@@ -892,7 +891,7 @@ fn print_with_analysis(
                                 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) {
@@ -904,7 +903,7 @@ fn print_with_analysis(
                     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);