diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-08-03 11:22:35 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-08-03 11:22:35 -0700 |
| commit | dfe1f6260e7e076114b95b42053cf6dc4cbaca68 (patch) | |
| tree | 62494df82d25e902d11e71ae5fab63088437ef90 /src/libsyntax/parse | |
| parent | b3933b88220b3a63f2a61b6769492898f718f1b4 (diff) | |
| download | rust-dfe1f6260e7e076114b95b42053cf6dc4cbaca68.tar.gz rust-dfe1f6260e7e076114b95b42053cf6dc4cbaca68.zip | |
rustc: Remove all fixed-length strings from our codebase
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) } |
