summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-17 01:48:23 +0000
committerbors <bors@rust-lang.org>2018-12-17 01:48:23 +0000
commitc6fb01d62916afa0c489670b665a39d1fe903a4a (patch)
tree9a07eccfffaf39ea2561aac81d64f26f6f8df6d6 /src/libsyntax/ext
parenta8a2a887d0a65fff6c777f9bcd7b1c0bdfbbddc0 (diff)
parente80c7ddb05ee584c12131a4713173a3eafc49f4a (diff)
downloadrust-c6fb01d62916afa0c489670b665a39d1fe903a4a.tar.gz
rust-c6fb01d62916afa0c489670b665a39d1fe903a4a.zip
Auto merge of #56737 - nnethercote:TokenStream-improvements, r=petrochenkov
`TokenStream` improvements

Some `TokenStream` improvements: shrinking `TokenStream` and some other types, and some other code clean-ups.
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/quote.rs2
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index c3497a17806..5820b49ab62 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -247,7 +247,7 @@ pub mod rt {
 
             let delim_span = DelimSpan::from_single(self.span);
             r.push(TokenTree::Delimited(
-                delim_span, token::Bracket, TokenStream::concat(inner).into()
+                delim_span, token::Bracket, TokenStream::new(inner).into()
             ));
             r
         }
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index a76779ffebd..a63abd40495 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -103,12 +103,12 @@ pub fn transcribe(cx: &ExtCtxt,
                 }
                 Frame::Delimited { forest, span, .. } => {
                     if result_stack.is_empty() {
-                        return TokenStream::concat(result);
+                        return TokenStream::new(result);
                     }
                     let tree = TokenTree::Delimited(
                         span,
                         forest.delim,
-                        TokenStream::concat(result).into(),
+                        TokenStream::new(result).into(),
                     );
                     result = result_stack.pop().unwrap();
                     result.push(tree.into());