diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-14 14:06:00 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-18 13:25:17 +1100 |
| commit | e4ec4a6da350ae2564971ae826a1bc3ec9a41988 (patch) | |
| tree | 37daff706da6abf4b60047ce3db6ad192e192422 /src/libsyntax/tokenstream.rs | |
| parent | 212ae58f36e4c9f2e0f46153f1c50a657e6c25db (diff) | |
| download | rust-e4ec4a6da350ae2564971ae826a1bc3ec9a41988.tar.gz rust-e4ec4a6da350ae2564971ae826a1bc3ec9a41988.zip | |
Change `MetaItem::tokens()` to `MetaItem::token_trees_and_joints()`.
Likewise for `NestedMetaItem::tokens()`. Also, add `MetaItemKind::token_trees_and_joints()`, which `MetaItemKind::tokens()` now calls. This avoids some unnecessary `TokenTree` to `TokenStream` conversions, and removes the need for the clumsy `TokenStream::append_to_tree_and_joint_vec()`.
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs index 3d89e73d729..ac155556cda 100644 --- a/src/libsyntax/tokenstream.rs +++ b/src/libsyntax/tokenstream.rs @@ -271,10 +271,6 @@ impl TokenStream { } } - pub fn append_to_tree_and_joint_vec(self, vec: &mut Vec<TreeAndJoint>) { - vec.extend(self.0.iter().cloned()); - } - pub fn trees(&self) -> Cursor { self.clone().into_trees() } |
