about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
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/parse/parser.rs
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/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index a4326d9ba47..a672a08a15a 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2939,7 +2939,7 @@ impl<'a> Parser<'a> {
                 _ => result.push(self.parse_token_tree().into()),
             }
         }
-        TokenStream::concat(result)
+        TokenStream::new(result)
     }
 
     /// Parse a prefix-unary-operator expr
@@ -4635,7 +4635,7 @@ impl<'a> Parser<'a> {
                         self.unexpected()?;
                         unreachable!()
                     };
-                    TokenStream::concat(vec![
+                    TokenStream::new(vec![
                         args.into(),
                         TokenTree::Token(token_lo.to(self.prev_span), token::FatArrow).into(),
                         body.into(),