diff options
| author | bors <bors@rust-lang.org> | 2018-08-16 15:44:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-08-16 15:44:30 +0000 |
| commit | b5590423e6ceb048dd7d792382e960d66b7615d2 (patch) | |
| tree | 378f5a5992fb8915a27e61d594a6497df71d6e5b /src/libsyntax/lib.rs | |
| parent | 50503497492e9bab8bc8c5ad3fe403a3a80276d3 (diff) | |
| parent | 69b9c23b3858dc87ceb6629b7640d5f579b8ed79 (diff) | |
| download | rust-b5590423e6ceb048dd7d792382e960d66b7615d2.tar.gz rust-b5590423e6ceb048dd7d792382e960d66b7615d2.zip | |
Auto merge of #53304 - dtolnay:extend, r=dtolnay
TokenStream::extend Two new insta-stable impls in libproc_macro: ```rust impl Extend<TokenTree> for TokenStream impl Extend<TokenStream> for TokenStream ``` `proc_macro::TokenStream` already implements `FromIterator<TokenTree>` and `FromIterator<TokenStream>` so I elected to support the same input types for `Extend`. **This commit reduces compile time of Serde derives by 60% (takes less than half as long to compile)** as measured by building our test suite: ```console $ git clone https://github.com/serde-rs/serde $ cd serde/test_suite $ cargo check --tests --features proc-macro2/nightly $ rm -f ../target/debug/deps/libtest_*.rmeta $ time cargo check --tests --features proc-macro2/nightly Before: 20.8 seconds After: 8.6 seconds ``` r? @alexcrichton
Diffstat (limited to 'src/libsyntax/lib.rs')
| -rw-r--r-- | src/libsyntax/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index c48ad0a802c..0a42325d2b6 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -130,6 +130,9 @@ pub mod util { mod rc_slice; pub use self::rc_slice::RcSlice; + + mod rc_vec; + pub use self::rc_vec::RcVec; } pub mod json; |
