summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2013-05-06 00:18:51 +0200
committerBjörn Steinbrink <bsteinbr@gmail.com>2013-05-14 16:36:23 +0200
commitbdc182cc41c2741edc6fdc4ec09b8522479aab40 (patch)
treee4d26bbc1b47702ef46cd01bbaa5b5dad8633416 /src/libsyntax/parse/token.rs
parent84745b483f322671f894b9e8d0a462c46275a9d3 (diff)
downloadrust-bdc182cc41c2741edc6fdc4ec09b8522479aab40.tar.gz
rust-bdc182cc41c2741edc6fdc4ec09b8522479aab40.zip
Use static string with fail!() and remove fail!(fmt!())
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index fde383b445c..27686c4e4aa 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -211,7 +211,7 @@ pub fn to_str(in: @ident_interner, t: &Token) -> ~str {
                       nt_block(*) => ~"block",
                       nt_stmt(*) => ~"statement",
                       nt_pat(*) => ~"pattern",
-                      nt_expr(*) => fail!(~"should have been handled above"),
+                      nt_expr(*) => fail!("should have been handled above"),
                       nt_ty(*) => ~"type",
                       nt_ident(*) => ~"identifier",
                       nt_path(*) => ~"path",