-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 8 pull requests #57624
Rollup of 8 pull requests #57624
Conversation
name old ns/iter new ns/iter diff ns/iter diff % speedup fmt::write_str_macro1 13,927 12,489 -1,438 -10.33% x 1.12 fmt::write_str_macro2 24,633 23,418 -1,215 -4.93% x 1.05 fmt::write_str_macro_debug 234,633 233,092 -1,541 -0.66% x 1.01 fmt::write_str_ref 5,819 5,823 4 0.07% x 1.00 fmt::write_str_value 6,012 5,828 -184 -3.06% x 1.03 fmt::write_vec_macro1 18,550 17,143 -1,407 -7.58% x 1.08 fmt::write_vec_macro2 30,369 28,920 -1,449 -4.77% x 1.05 fmt::write_vec_macro_debug 244,338 244,901 563 0.23% x 1.00 fmt::write_vec_ref 5,952 5,885 -67 -1.13% x 1.01 fmt::write_vec_value 5,944 5,894 -50 -0.84% x 1.01
name old2 ns/iter new2 ns/iter diff ns/iter diff % speedup fmt::write_str_macro1 12,295 12,308 13 0.11% x 1.00 fmt::write_str_macro2 24,079 21,451 -2,628 -10.91% x 1.12 fmt::write_str_macro_debug 238,363 230,807 -7,556 -3.17% x 1.03 fmt::write_str_ref 6,203 6,064 -139 -2.24% x 1.02 fmt::write_str_value 6,225 6,075 -150 -2.41% x 1.02 fmt::write_vec_macro1 17,144 17,121 -23 -0.13% x 1.00 fmt::write_vec_macro2 29,845 26,703 -3,142 -10.53% x 1.12 fmt::write_vec_macro_debug 248,840 242,117 -6,723 -2.70% x 1.03 fmt::write_vec_ref 5,954 6,438 484 8.13% x 0.92 fmt::write_vec_value 5,959 6,439 480 8.06% x 0.93
This shouldn't break compatibility for crates that do not use `feature(optin_builtin_traits)`, because as the test shows, it is only possible to impl a marker trait for a trait object in the crate the marker trait is defined in, which must define `feature(optin_builtin_traits)`. Fixes rust-lang#56934
`TokenStream::Stream` can represent a token stream containing any number of token trees. `TokenStream::Tree` is the special case representing a single token tree. The latter doesn't occur all that often dynamically, so this commit removes it, which simplifies the code quite a bit. This change has mixed performance effects. - The size of `TokenStream` drops from 32 bytes to 8 bytes, and there is one less case for all the match statements. - The conversion of a `TokenTree` to a `TokenStream` now requires two allocations, for the creation of a single element Lrc<Vec<_>>. (But a subsequent commit in this PR will reduce the main source of such conversions.)
`TokenStream` is now almost identical to `ThinTokenStream`. This commit removes the latter, replacing it with the former.
This avoids some allocations.
Because that's the more typical way of representing an all-or-nothing type.
This ensures that the test passes, regardless of what the user has set RUST_BACKTRACE to.
Make privacy checking, intrinsic checking and liveness checking incremental Blocked on rust-lang#51487 r? @michaelwoerister
…tsakis forbid manually impl'ing one of an object type's marker traits This shouldn't break compatibility for crates that do not use `feature(optin_builtin_traits)`, because as the test shows, it is only possible to impl a marker trait for a trait object in the crate the marker trait is defined in, which must define `feature(optin_builtin_traits)`. Fixes rust-lang#56934. r? @nikomatsakis
…re, 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
Small perf improvement for fmt Added benchmark is based on rust-lang#10761
Add core::iter::once_with() Functions `iter::once()` and `iter::repeat()` construct iterators from values. The latter has the lazy variant `iter::repeat_with()`, but the former doesn't. This PR therefore adds `iter::once_with()`. Another way to think of `iter::once_with()` is that it's a function that converts `FnOnce() -> T` into `Iterator<Item = T>`. If this seems like a reasonable addition, I'll open a tracking issue and update the `#[feature(...)]` attributes.
…crichton Add 'rustc-env:RUST_BACKTRACE=0' to const-pat-ice test This ensures that the test passes, regardless of what the user has set RUST_BACKTRACE to.
Simplify 'product' factorial example This simplifies the [`factorial(n: 32)`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#examples-46) implementation as example for the `Iterator::product()` function. It currently uses unnecessary additional complexity. Although very minimal, I do not want to include it in some other irrelevant PR.
… r=QuietMisdreavus [rustdoc] Fix crates filtering box not being filled Currently, the filter crate box (at the left of the search input) is always empty. To get the number of keys of dictionary in JS, you need to call `Object.keys()` on it. r? @QuietMisdreavus
@bors r+ p=8 |
📌 Commit f14a882 has been approved by |
⌛ Testing commit f14a882 with merge 2e10d6aa037422bc104ed2192bfcdd6ff697b15b... |
💔 Test failed - checks-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
TokenStream
some more #57486 (SimplifyTokenStream
some more)Failed merges:
r? @ghost