diff options
| author | bors <bors@rust-lang.org> | 2013-06-08 10:25:15 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-08 10:25:15 -0700 |
| commit | b8fa9d3be10e952fbcaf14f3098aebf13dedd7ec (patch) | |
| tree | f99d1c8374844ccf7a3368110d3e33c0e51f18bb /src/libsyntax/ext/bytes.rs | |
| parent | e2ec8e71cec0373616953f8188cf7c4953269af0 (diff) | |
| parent | 98ba91f81bea38d8fc8bd5bc0cb44ac3e173a53c (diff) | |
| download | rust-b8fa9d3be10e952fbcaf14f3098aebf13dedd7ec.tar.gz rust-b8fa9d3be10e952fbcaf14f3098aebf13dedd7ec.zip | |
auto merge of #7015 : huonw/rust/each-fn-kill, r=thestinger
Continuation of #6995/#6999.
Diffstat (limited to 'src/libsyntax/ext/bytes.rs')
| -rw-r--r-- | src/libsyntax/ext/bytes.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/ext/bytes.rs b/src/libsyntax/ext/bytes.rs index a046395b6f5..51fbaee7a33 100644 --- a/src/libsyntax/ext/bytes.rs +++ b/src/libsyntax/ext/bytes.rs @@ -10,6 +10,7 @@ /* The compiler code necessary to support the bytes! extension. */ +use core::iterator::IteratorUtil; use ast; use codemap::span; use ext::base::*; @@ -27,7 +28,7 @@ pub fn expand_syntax_ext(cx: @ExtCtxt, sp: span, tts: &[ast::token_tree]) -> bas ast::expr_lit(lit) => match lit.node { // string literal, push each byte to vector expression ast::lit_str(s) => { - for s.each |byte| { + for s.bytes_iter().advance |byte| { bytes.push(cx.expr_u8(sp, byte)); } } |
