diff options
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index f697685796f..02646614435 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2164,7 +2164,7 @@ class parser { } _ => { self.fatal(~"expected `,` or `)`, found `" + - token_to_str(self.reader, self.token) + "`"); + token_to_str(self.reader, self.token) + ~"`"); } } } else { diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 9d3bbef2cd4..3dbcef66732 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -167,8 +167,8 @@ fn to_str(in: interner<@~str>, t: token) -> ~str { } LIT_FLOAT(s, t) { let mut body = *in.get(s); - if body.ends_with(".") { - body = body + "0"; // `10.f` is not a float literal + if body.ends_with(~".") { + body = body + ~"0"; // `10.f` is not a float literal } body + ast_util::float_ty_to_str(t) } |
