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 | |
| 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')
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 10 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index 00fd5d41f93..81c8ba9da50 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -71,13 +71,13 @@ impl compile of gen_send for message { if this.proto.is_bounded() { let (sp, rp) = alt (this.dir, next.dir) { - (send, send) { ("c", "s") } - (send, recv) { ("s", "c") } - (recv, send) { ("s", "c") } - (recv, recv) { ("c", "s") } + (send, send) { (~"c", ~"s") } + (send, recv) { (~"s", ~"c") } + (recv, send) { (~"s", ~"c") } + (recv, recv) { (~"c", ~"s") } }; - body += "let b = pipe.reuse_buffer();\n"; + body += ~"let b = pipe.reuse_buffer();\n"; body += fmt!{"let %s = pipes::send_packet_buffered(\ ptr::addr_of(b.buffer.data.%s));\n", sp, *next.name}; 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) } diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 800800504fd..feea800b44c 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -600,7 +600,7 @@ fn print_item(s: ps, &&item: @ast::item) { bclose(s, item.span); } ast::item_mac({node: ast::mac_invoc_tt(pth, tts), _}) { - head(s, path_to_str(pth) + "! " + *item.ident); + head(s, path_to_str(pth) + ~"! " + *item.ident); bopen(s); for tts.each |tt| { print_tt(s, tt); } bclose(s, item.span); @@ -873,7 +873,7 @@ fn print_mac(s: ps, m: ast::mac) { // FIXME: extension 'body' (#2339) } ast::mac_invoc_tt(pth, tts) { - head(s, path_to_str(pth) + "!"); + head(s, path_to_str(pth) + ~"!"); bopen(s); for tts.each() |tt| { print_tt(s, tt); } bclose(s, m.span); |
