diff --git a/mk/crates.mk b/mk/crates.mk index 03716f5d7f680..fd41666275b50 100644 --- a/mk/crates.mk +++ b/mk/crates.mk @@ -51,7 +51,7 @@ TARGET_CRATES := libc std green native flate arena glob term semver \ uuid serialize sync getopts collections num test time rand \ - url log regex graphviz core rbml rlibc alloc debug rustrt \ + url log regex graphviz core rbml rlibc alloc rustrt \ unicode HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \ rustc_llvm rustc_back @@ -63,20 +63,19 @@ DEPS_libc := core DEPS_rlibc := core DEPS_unicode := core DEPS_alloc := core libc native:jemalloc -DEPS_debug := std DEPS_rustrt := alloc core libc collections native:rustrt_native DEPS_std := core libc rand alloc collections rustrt sync unicode \ native:rust_builtin native:backtrace DEPS_graphviz := std DEPS_green := std native:context_switch DEPS_native := std -DEPS_syntax := std term serialize log fmt_macros debug arena libc +DEPS_syntax := std term serialize log fmt_macros arena libc DEPS_rustc := syntax flate arena serialize getopts rbml \ - time log graphviz debug rustc_llvm rustc_back + time log graphviz rustc_llvm rustc_back DEPS_rustc_llvm := native:rustllvm libc std DEPS_rustc_back := std syntax rustc_llvm flate log libc DEPS_rustdoc := rustc native:hoedown serialize getopts \ - test time debug + test time DEPS_flate := std native:miniz DEPS_arena := std DEPS_graphviz := std diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index c1aa588eecc49..df63d161eec35 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -81,7 +81,7 @@ impl PartialEq for Ident { // one example and its non-hygienic counterpart would be: // syntax::parse::token::mtwt_token_eq // syntax::ext::tt::macro_parser::token_name_eq - fail!("not allowed to compare these idents: {:?}, {:?}. \ + fail!("not allowed to compare these idents: {}, {}. \ Probably related to issue \\#6993", self, other); } } diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs index 2d0cea2fefc9d..fb5373cee0040 100644 --- a/src/libsyntax/ast_map/mod.rs +++ b/src/libsyntax/ast_map/mod.rs @@ -96,6 +96,7 @@ pub fn path_to_string>(mut path: PI) -> String { }).to_string() } +#[deriving(Show)] pub enum Node<'ast> { NodeItem(&'ast Item), NodeForeignItem(&'ast ForeignItem), @@ -387,7 +388,7 @@ impl<'ast> Map<'ast> { PathName(ident.name) } MethMac(_) => { - fail!("no path elem for {:?}", node) + fail!("no path elem for {}", node) } } } @@ -401,13 +402,13 @@ impl<'ast> Map<'ast> { MethDecl(ident, _, _, _, _, _, _, _) => { PathName(ident.name) } - MethMac(_) => fail!("no path elem for {:?}", node), + MethMac(_) => fail!("no path elem for {}", node), } } TypeTraitItem(ref m) => PathName(m.ident.name), }, NodeVariant(v) => PathName(v.node.name.name), - _ => fail!("no path elem for {:?}", node) + _ => fail!("no path elem for {}", node) } } diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index f51c2985f0bf4..726aceb5819b6 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -308,7 +308,7 @@ pub fn empty_generics() -> Generics { // ______________________________________________________________________ // Enumerating the IDs which appear in an AST -#[deriving(Encodable, Decodable)] +#[deriving(Encodable, Decodable, Show)] pub struct IdRange { pub min: NodeId, pub max: NodeId, diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 575dcf32dd6cb..c792d4b99eefb 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -1700,11 +1700,11 @@ foo_module!() }).enumerate() { if mtwt::resolve(v.segments.get(0).identifier) != resolved_binding { println!("uh oh, xx binding didn't match xx varref:"); - println!("this is xx varref \\# {:?}",idx); - println!("binding: {:?}",cxbind); - println!("resolves to: {:?}",resolved_binding); - println!("varref: {:?}",v.segments.get(0).identifier); - println!("resolves to: {:?}", + println!("this is xx varref \\# {}", idx); + println!("binding: {}", cxbind); + println!("resolves to: {}", resolved_binding); + println!("varref: {}", v.segments.get(0).identifier); + println!("resolves to: {}", mtwt::resolve(v.segments.get(0).identifier)); mtwt::with_sctable(|x| mtwt::display_sctable(x)); } diff --git a/src/libsyntax/ext/mtwt.rs b/src/libsyntax/ext/mtwt.rs index 6fe4f5b324c6e..523299abce141 100644 --- a/src/libsyntax/ext/mtwt.rs +++ b/src/libsyntax/ext/mtwt.rs @@ -38,7 +38,7 @@ pub struct SCTable { rename_memo: RefCell>, } -#[deriving(PartialEq, Encodable, Decodable, Hash)] +#[deriving(PartialEq, Encodable, Decodable, Hash, Show)] pub enum SyntaxContext_ { EmptyCtxt, Mark (Mrk,SyntaxContext), @@ -129,7 +129,7 @@ fn new_sctable_internal() -> SCTable { pub fn display_sctable(table: &SCTable) { error!("SC table:"); for (idx,val) in table.table.borrow().iter().enumerate() { - error!("{:4u} : {:?}",idx,val); + error!("{:4u} : {}",idx,val); } } diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index 8faecd407a86b..2eb3b398da815 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -1389,7 +1389,7 @@ mod test { let a_val = $a; let b_val = $b; if !(pred_val(a_val.as_slice(),b_val.as_slice())) { - fail!("expected args satisfying {}, got {:?} and {:?}", + fail!("expected args satisfying {}, got {} and {}", $predname, a_val, b_val); } } diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index 74b93e75e64dd..17dd546ad59d1 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -63,7 +63,7 @@ impl<'a> ParserAttr for Parser<'a> { /// If permit_inner is true, then a leading `!` indicates an inner /// attribute fn parse_attribute(&mut self, permit_inner: bool) -> ast::Attribute { - debug!("parse_attributes: permit_inner={:?} self.token={:?}", + debug!("parse_attributes: permit_inner={} self.token={}", permit_inner, self.token); let (span, value, mut style) = match self.token { token::POUND => { diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 66ecdbfca02d4..c4a8775a01282 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -823,19 +823,19 @@ mod test { } }, _ => { - error!("failing value 3: {:?}",first_set); + error!("failing value 3: {}",first_set); assert_eq!("wrong 3","correct") } } }, _ => { - error!("failing value 2: {:?}",delim_elts); + error!("failing value 2: {}",delim_elts); assert_eq!("wrong","correct"); } } }, _ => { - error!("failing value: {:?}",tts); + error!("failing value: {}",tts); assert_eq!("wrong 1","correct"); } } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index d5253cff6cb26..7e77283cca778 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -492,7 +492,7 @@ impl<'a> Parser<'a> { /// followed by some token from the set edible + inedible. Recover /// from anticipated input errors, discarding erroneous characters. pub fn commit_expr(&mut self, e: &Expr, edible: &[token::Token], inedible: &[token::Token]) { - debug!("commit_expr {:?}", e); + debug!("commit_expr {}", e); match e.node { ExprPath(..) => { // might be unit-struct construction; check for recoverableinput error. @@ -1535,7 +1535,7 @@ impl<'a> Parser<'a> { // TYPE TO BE INFERRED TyInfer } else { - let msg = format!("expected type, found token {:?}", self.token); + let msg = format!("expected type, found token {}", self.token); self.fatal(msg.as_slice()); }; @@ -1591,7 +1591,7 @@ impl<'a> Parser<'a> { /// identifier names. pub fn parse_arg_general(&mut self, require_name: bool) -> Arg { let pat = if require_name || self.is_named_argument() { - debug!("parse_arg_general parse_pat (require_name:{:?})", + debug!("parse_arg_general parse_pat (require_name:{})", require_name); let pat = self.parse_pat(); @@ -1882,7 +1882,7 @@ impl<'a> Parser<'a> { token::BINOP(token::SHR) => { return res; } _ => { let msg = format!("expected `,` or `>` after lifetime \ - name, got: {:?}", + name, got: {}", self.token); self.fatal(msg.as_slice()); } @@ -4711,7 +4711,7 @@ impl<'a> Parser<'a> { attrs = attrs_remaining.clone().append(attrs.as_slice()); first = false; } - debug!("parse_mod_items: parse_item_or_view_item(attrs={:?})", + debug!("parse_mod_items: parse_item_or_view_item(attrs={})", attrs); match self.parse_item_or_view_item(attrs, true /* macros allowed */) {