about summary refs log tree commit diff
path: root/src/libsyntax/attr
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-19 14:21:17 +0100
committerGitHub <noreply@github.com>2019-01-19 14:21:17 +0100
commit349c9eeb355a979c2e51f832d05ce9212f0aeeba (patch)
tree26d22fe0672d754636b44b522130612192a09363 /src/libsyntax/attr
parentc87144f3caf9a1580e8734d4d1604e723a5bd6e6 (diff)
parent728572440171d8d9c0557c89c3d71cc8d7cf6c2e (diff)
downloadrust-349c9eeb355a979c2e51f832d05ce9212f0aeeba.tar.gz
rust-349c9eeb355a979c2e51f832d05ce9212f0aeeba.zip
Rollup merge of #57486 - nnethercote:simplify-TokenStream-more, r=petrochenkov
Simplify `TokenStream` some more

These commits simplify `TokenStream`, remove `ThinTokenStream`, and avoid some clones. The end result is simpler code and a slight perf win on some benchmarks.

r? @petrochenkov
Diffstat (limited to 'src/libsyntax/attr')
-rw-r--r--src/libsyntax/attr/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs
index f83c1ec1455..f6d7590a794 100644
--- a/src/libsyntax/attr/mod.rs
+++ b/src/libsyntax/attr/mod.rs
@@ -570,7 +570,7 @@ impl MetaItemKind {
             }
             Some(TokenTree::Delimited(_, delim, ref tts)) if delim == token::Paren => {
                 tokens.next();
-                tts.stream()
+                tts.clone()
             }
             _ => return Some(MetaItemKind::Word),
         };