summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2018-12-12 10:01:08 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2018-12-12 20:36:00 +1100
commite80c7ddb05ee584c12131a4713173a3eafc49f4a (patch)
tree20bcd4aa3ddb48334f1d872e1a1e8c26afcc7398 /src/libsyntax/parse/lexer
parent07c12fa89e297bf5940f903dea8186a0a33f9d82 (diff)
downloadrust-e80c7ddb05ee584c12131a4713173a3eafc49f4a.tar.gz
rust-e80c7ddb05ee584c12131a4713173a3eafc49f4a.zip
Rename `TokenStream::concat` and remove `TokenStream::concat_rc_vec`.
`TokenStream::new` is a better name for the former, and the latter is
now just equivalent to `TokenStream::Stream`.
Diffstat (limited to 'src/libsyntax/parse/lexer')
-rw-r--r--src/libsyntax/parse/lexer/tokentrees.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/lexer/tokentrees.rs b/src/libsyntax/parse/lexer/tokentrees.rs
index 86c87cf898d..0906c25cab3 100644
--- a/src/libsyntax/parse/lexer/tokentrees.rs
+++ b/src/libsyntax/parse/lexer/tokentrees.rs
@@ -22,7 +22,7 @@ impl<'a> StringReader<'a> {
             tts.push(self.parse_token_tree()?);
         }
 
-        Ok(TokenStream::concat(tts))
+        Ok(TokenStream::new(tts))
     }
 
     // Parse a stream of tokens into a list of `TokenTree`s, up to a `CloseDelim`.
@@ -30,14 +30,14 @@ impl<'a> StringReader<'a> {
         let mut tts = vec![];
         loop {
             if let token::CloseDelim(..) = self.token {
-                return TokenStream::concat(tts);
+                return TokenStream::new(tts);
             }
 
             match self.parse_token_tree() {
                 Ok(tree) => tts.push(tree),
                 Err(mut e) => {
                     e.emit();
-                    return TokenStream::concat(tts);
+                    return TokenStream::new(tts);
                 }
             }
         }