diff options
| author | bors <bors@rust-lang.org> | 2019-10-19 01:16:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-19 01:16:41 +0000 |
| commit | 14f0ed64e306cfc232c3209985afb53fa2cadbb2 (patch) | |
| tree | 6d41ada9496e26f1b05a07658d62d0773663282e /src/libsyntax/tokenstream.rs | |
| parent | 518deda77feb4957bfd311b6cb50baa7ef9ca6a2 (diff) | |
| parent | 3850408b9b85d27e98915e57cefbd659e909b37a (diff) | |
| download | rust-14f0ed64e306cfc232c3209985afb53fa2cadbb2.tar.gz rust-14f0ed64e306cfc232c3209985afb53fa2cadbb2.zip | |
Auto merge of #65570 - tmandry:rollup-hck39pf, r=tmandry
Rollup of 19 pull requests
Successful merges:
- #65016 (Always inline `mem::{size_of,align_of}` in debug builds)
- #65197 (Prepare `MutVisitor`s to handle interned projections)
- #65201 (Disable Go and OCaml bindings when building LLVM)
- #65334 (Add long error explanation for E0575)
- #65364 (Collect occurrences of empty blocks for mismatched braces diagnostic)
- #65455 (Avoid unnecessary `TokenTree` to `TokenStream` conversions)
- #65472 (Use a sharded dep node to dep node index map)
- #65480 (Speed up `LexicalResolve::expansion()`)
- #65493 (Add long error explanation for E0584)
- #65496 (properly document panics in div_euclid and rem_euclid)
- #65498 (Plugins deprecation: don’t suggest simply removing the attribute)
- #65508 (add option to ping llvm ice-breakers to triagebot)
- #65511 (save-analysis: Nest tables when processing impl block definitions)
- #65513 (reorder fmt docs for more clarity)
- #65532 (doc: make BitSet intro more short)
- #65535 (rustc: arena-allocate the slice in `ty::GenericsPredicate`, not the whole struct.)
- #65540 (show up some extra info when t!() fails)
- #65549 (Fix left/right shift typo in wrapping rotate docs)
- #65552 (Clarify diagnostics when using `~` as a unary op)
Failed merges:
- #65390 (Add long error explanation for E0576)
- #65434 (Add long error explanation for E0577)
- #65471 (Add long error explanation for E0578)
r? @ghost
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs index db6832d6423..ac155556cda 100644 --- a/src/libsyntax/tokenstream.rs +++ b/src/libsyntax/tokenstream.rs @@ -202,9 +202,9 @@ impl From<TokenTree> for TreeAndJoint { } } -impl<T: Into<TokenStream>> iter::FromIterator<T> for TokenStream { - fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self { - TokenStream::from_streams(iter.into_iter().map(Into::into).collect::<SmallVec<_>>()) +impl iter::FromIterator<TokenTree> for TokenStream { + fn from_iter<I: IntoIterator<Item = TokenTree>>(iter: I) -> Self { + TokenStream::new(iter.into_iter().map(Into::into).collect::<Vec<TreeAndJoint>>()) } } @@ -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() } |
