diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index 01e55fb2edd9a9e58ab807e543d55fbf39378f25..e3316b1251d92fa492353960522106bf11bf0fd2 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -168,10 +168,10 @@ //! dot::Id::new(format!("N{}", n)).unwrap() //! } //! fn node_label<'b>(&'b self, n: &Nd) -> dot::LabelText<'b> { -//! dot::LabelStr(self.nodes[*n].as_slice().into_cow()) +//! dot::LabelText::LabelStr(self.nodes[*n].as_slice().into_cow()) //! } //! fn edge_label<'b>(&'b self, _: &Ed) -> dot::LabelText<'b> { -//! dot::LabelStr("⊆".into_cow()) +//! dot::LabelText::LabelStr("⊆".into_cow()) //! } //! } //! @@ -225,10 +225,10 @@ //! } //! fn node_label<'b>(&'b self, n: &Nd<'b>) -> dot::LabelText<'b> { //! let &(i, _) = n; -//! dot::LabelStr(self.nodes[i].as_slice().into_cow()) +//! dot::LabelText::LabelStr(self.nodes[i].as_slice().into_cow()) //! } //! fn edge_label<'b>(&'b self, _: &Ed<'b>) -> dot::LabelText<'b> { -//! dot::LabelStr("⊆".into_cow()) +//! dot::LabelText::LabelStr("⊆".into_cow()) //! } //! } //! @@ -274,7 +274,7 @@ #![feature(globs, slicing_syntax)] #![feature(unboxed_closures)] -pub use self::LabelText::*; +use self::LabelText::*; use std::borrow::IntoCow; use std::io; @@ -586,8 +586,8 @@ fn indent(w: &mut W) -> io::IoResult<()> { #[cfg(test)] mod tests { use self::NodeLabels::*; - use super::{Id, LabelText, LabelStr, EscStr, Labeller}; - use super::{Nodes, Edges, GraphWalk, render}; + use super::{Id, Labeller, Nodes, Edges, GraphWalk, render}; + use super::LabelText::{mod, LabelStr, EscStr}; use std::io::IoResult; use std::str; use std::borrow::IntoCow; diff --git a/src/librustc/middle/cfg/graphviz.rs b/src/librustc/middle/cfg/graphviz.rs index 06fef66c1e0033609f053b0e8ca3b6190f3c2c9f..8a2ecbca20d55beab1226c9fa0284a1f9ad83b08 100644 --- a/src/librustc/middle/cfg/graphviz.rs +++ b/src/librustc/middle/cfg/graphviz.rs @@ -60,16 +60,16 @@ fn node_id(&'a self, &(i,_): &Node<'a>) -> dot::Id<'a> { fn node_label(&'a self, &(i, n): &Node<'a>) -> dot::LabelText<'a> { if i == self.cfg.entry { - dot::LabelStr("entry".into_cow()) + dot::LabelText::LabelStr("entry".into_cow()) } else if i == self.cfg.exit { - dot::LabelStr("exit".into_cow()) + dot::LabelText::LabelStr("exit".into_cow()) } else if n.data.id == ast::DUMMY_NODE_ID { - dot::LabelStr("(dummy_node)".into_cow()) + dot::LabelText::LabelStr("(dummy_node)".into_cow()) } else { let s = self.ast_map.node_to_string(n.data.id); // left-aligns the lines let s = replace_newline_with_backslash_l(s); - dot::EscStr(s.into_cow()) + dot::LabelText::EscStr(s.into_cow()) } } @@ -87,7 +87,7 @@ fn edge_label(&self, e: &Edge<'a>) -> dot::LabelText<'a> { let s = replace_newline_with_backslash_l(s); label.push_str(format!("exiting scope_{} {}", i, s[])[]); } - dot::EscStr(label.into_cow()) + dot::LabelText::EscStr(label.into_cow()) } } diff --git a/src/librustc_borrowck/graphviz.rs b/src/librustc_borrowck/graphviz.rs index ac6b962d6470448e43958c0eb41109df4d5732c3..a54a2eeb5918a94cbe2b8d8b4309849975450ec7 100644 --- a/src/librustc_borrowck/graphviz.rs +++ b/src/librustc_borrowck/graphviz.rs @@ -137,8 +137,8 @@ fn node_label(&'a self, n: &Node<'a>) -> dot::LabelText<'a> { let suffix = self.dataflow_for(dataflow::Exit, n); let inner_label = self.inner.node_label(n); inner_label - .prefix_line(dot::LabelStr(prefix.into_cow())) - .suffix_line(dot::LabelStr(suffix.into_cow())) + .prefix_line(dot::LabelText::LabelStr(prefix.into_cow())) + .suffix_line(dot::LabelText::LabelStr(suffix.into_cow())) } fn edge_label(&'a self, e: &Edge<'a>) -> dot::LabelText<'a> { self.inner.edge_label(e) } }