diff options
| author | bors <bors@rust-lang.org> | 2014-03-29 18:56:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-29 18:56:36 -0700 |
| commit | d79fbba0db84b2d27440f8feba715dffd3aeaa01 (patch) | |
| tree | d5f8701b97fcf2fc596a52215ad96462c1eb981e /src/libsyntax/ext/source_util.rs | |
| parent | 86890b9e7c5db28ac2da5cd63d1a51d63a5e6bec (diff) | |
| parent | c356e3ba6a12c3294a9a428ef9120cff9306bf4b (diff) | |
| download | rust-d79fbba0db84b2d27440f8feba715dffd3aeaa01.tar.gz rust-d79fbba0db84b2d27440f8feba715dffd3aeaa01.zip | |
auto merge of #13203 : Kimundi/rust/de-map-vec3, r=cmr
They required unnecessary temporaries, are replaced with iterators, and would conflict with a possible future `Iterable` trait.
Diffstat (limited to 'src/libsyntax/ext/source_util.rs')
| -rw-r--r-- | src/libsyntax/ext/source_util.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index 8931fb0f443..4d8d816d225 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -71,7 +71,9 @@ pub fn expand_mod(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) -> base::MacResult { base::check_zero_tts(cx, sp, tts, "module_path!"); let string = cx.mod_path() + .iter() .map(|x| token::get_ident(*x).get().to_str()) + .collect::<Vec<~str>>() .connect("::"); base::MRExpr(cx.expr_str(sp, token::intern_and_get_ident(string))) } |
