diff options
| author | bors <bors@rust-lang.org> | 2018-12-17 01:48:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-17 01:48:23 +0000 |
| commit | c6fb01d62916afa0c489670b665a39d1fe903a4a (patch) | |
| tree | 9a07eccfffaf39ea2561aac81d64f26f6f8df6d6 /src/libsyntax/attr | |
| parent | a8a2a887d0a65fff6c777f9bcd7b1c0bdfbbddc0 (diff) | |
| parent | e80c7ddb05ee584c12131a4713173a3eafc49f4a (diff) | |
| download | rust-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/attr')
| -rw-r--r-- | src/libsyntax/attr/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index 7723c15a266..73cbe49f43b 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -483,7 +483,7 @@ impl MetaItem { last_pos = segment.ident.span.hi(); } idents.push(self.node.tokens(self.span)); - TokenStream::concat(idents) + TokenStream::new(idents) } fn from_tokens<I>(tokens: &mut iter::Peekable<I>) -> Option<MetaItem> @@ -539,7 +539,7 @@ impl MetaItemKind { match *self { MetaItemKind::Word => TokenStream::empty(), MetaItemKind::NameValue(ref lit) => { - TokenStream::concat(vec![TokenTree::Token(span, Token::Eq).into(), lit.tokens()]) + TokenStream::new(vec![TokenTree::Token(span, Token::Eq).into(), lit.tokens()]) } MetaItemKind::List(ref list) => { let mut tokens = Vec::new(); @@ -552,7 +552,7 @@ impl MetaItemKind { TokenTree::Delimited( DelimSpan::from_single(span), token::Paren, - TokenStream::concat(tokens).into(), + TokenStream::new(tokens).into(), ).into() } } |
