From 1bede1f5e0012069feaf093a6287256af606ff92 Mon Sep 17 00:00:00 2001 From: Kevin Cantu Date: Fri, 12 Oct 2012 12:32:36 -0700 Subject: Replace several common macros of the form #m[...] with m!(...) This commit replaces nearly all remaining uses of #fmt, #debug, #error, and #info, and fixes some error messages... --- src/libsyntax/parse/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/parse/parser.rs') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c3c182d6687..4457c64a68c 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2414,7 +2414,7 @@ impl parser { fn expect_self_ident() { if !self.is_self_ident() { - self.fatal(#fmt("expected `self` but found `%s`", + self.fatal(fmt!("expected `self` but found `%s`", token_to_str(self.reader, self.token))); } self.bump(); @@ -2696,7 +2696,7 @@ impl parser { ctor_decl(a_fn_decl, attrs, blk, s) => { match the_ctor { Some((_, _, _, s_first)) => { - self.span_note(s, #fmt("Duplicate constructor \ + self.span_note(s, fmt!("Duplicate constructor \ declaration for class %s", *self.interner.get(class_name))); self.span_fatal(copy s_first, ~"First constructor \ @@ -2710,7 +2710,7 @@ impl parser { dtor_decl(blk, attrs, s) => { match the_dtor { Some((_, _, s_first)) => { - self.span_note(s, #fmt("Duplicate destructor \ + self.span_note(s, fmt!("Duplicate destructor \ declaration for class %s", *self.interner.get(class_name))); self.span_fatal(copy s_first, ~"First destructor \ -- cgit 1.4.1-3-g733a5