diff options
| author | bors <bors@rust-lang.org> | 2013-06-11 21:37:43 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-11 21:37:43 -0700 |
| commit | cc80652e4a627378a36b50fab9e72349129cb56a (patch) | |
| tree | ada1e23e714b7dc587d86aeddb54a954dded8f3a /src/libsyntax/ext/log_syntax.rs | |
| parent | 7033dfcf917ccef44fbc3e33d31814455c13b4c6 (diff) | |
| parent | 9f0c85acc967110c85f9a8bdcb32df4606a6dff5 (diff) | |
| download | rust-cc80652e4a627378a36b50fab9e72349129cb56a.tar.gz rust-cc80652e4a627378a36b50fab9e72349129cb56a.zip | |
auto merge of #7060 : huonw/rust/more-str, r=thestinger
There are now only half-a-dozen or so functions left `std::str` that should be methods. Highlights: - `.substr` was removed, since most of the uses of it in the code base were actually incorrect (it had a weird mixing of a byte index and a unicode character count), adding `.slice_chars` if one wants to handle characters, and the normal `.slice` method to handle bytes. - Code duplication between the two impls for `connect` and `concat` was removed via a new `Str` trait, that is purely designed to allow an explicit -> `&str` conversion (`.as_slice()`) - Deconfuse the 5 different functions for converting to `[u8]` (3 of which had actually incorrect documentation: implying that they didn't have the null terminator), into 3: `as_bytes` (all strings), `as_bytes_with_null` (`&'static str`, `@str` and `~str`) and `as_bytes_with_null_consume` (`~str`). None of these allocate, unlike the old versions. (cc @thestinger)
Diffstat (limited to 'src/libsyntax/ext/log_syntax.rs')
| -rw-r--r-- | src/libsyntax/ext/log_syntax.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsyntax/ext/log_syntax.rs b/src/libsyntax/ext/log_syntax.rs index 3ad4f87083f..ff8b492c943 100644 --- a/src/libsyntax/ext/log_syntax.rs +++ b/src/libsyntax/ext/log_syntax.rs @@ -18,7 +18,6 @@ use print; use parse::token::{get_ident_interner}; use core::io; -use core::vec; pub fn expand_syntax_ext(cx: @ExtCtxt, sp: codemap::span, @@ -28,7 +27,7 @@ pub fn expand_syntax_ext(cx: @ExtCtxt, cx.print_backtrace(); io::stdout().write_line( print::pprust::tt_to_str( - ast::tt_delim(vec::to_owned(tt)), + ast::tt_delim(tt.to_owned()), get_ident_interner())); //trivial expression |
