-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 9 pull requests #69118
Rollup of 9 pull requests #69118
Commits on Dec 26, 2019
-
Relax bounds on HashMap to match hashbrown
No functional changes are made, and all APIs are moved to strictly less restrictive bounds. These APIs changed from the old bound listed to no trait bounds: K: Hash + Eq * new * with_capacity K: Eq + Hash, S: BuildHasher * with_hasher * with_capacity_and_hasher * hasher K: Eq + Hash + Debug -> K: Debug S: BuildHasher -> S <HashMap as Debug> K: Eq + Hash -> K S: BuildHasher + Default -> S: Default <HashMap as Default>
Configuration menu - View commit details
-
Copy full SHA for 3b92689 - Browse repository at this point
Copy the full SHA 3b92689View commit details
Commits on Dec 27, 2019
-
Relax bounds on HashSet to match hashbrown
No functional changes are made, and all APIs are moved to strictly less restrictive bounds. These APIs changed from the old bound listed to the new bound: T: Hash + Eq -> T * new * with_capacity T: Eq + Hash, S: BuildHasher -> T * with_hasher * with_capacity_and_hasher * hasher T: Eq + Hash + Debug -> T: Debug S: BuildHasher -> S <HashSet as Debug> T: Eq + Hash -> T S: BuildHasher + Default -> S: Default <HashSet as Default>
Configuration menu - View commit details
-
Copy full SHA for 48859db - Browse repository at this point
Copy the full SHA 48859dbView commit details
Commits on Feb 6, 2020
-
Avoid instantiating many
Parser
structs ingeneric_extension
.Currently, every iteration of the main loop in `generic_extension` instantiates a `Parser`, which is expensive because `Parser` is a large type. Many of those instantiations are only used immutably, particularly for simple-but-repetitive macros of the sort seen in `html5ever` and PR 68836. This commit initializes a single "base" parser outside the loop, and then uses `Cow` to avoid cloning it except for the mutating iterations. This speeds up `html5ever` runs by up to 15%.
Configuration menu - View commit details
-
Copy full SHA for 6bf2cc2 - Browse repository at this point
Copy the full SHA 6bf2cc2View commit details -
Remove the
Cow
fromDirectory
.The previous commit wrapped `Parser` within a `Cow` for the hot macro parsing path. As a result, there's no need for the `Cow` within `Directory`, because it lies within `Parser`.
Configuration menu - View commit details
-
Copy full SHA for f840a95 - Browse repository at this point
Copy the full SHA f840a95View commit details -
Change condition ordering in
parse_tt
.This is a small win, because `Failure` is much more common than `Success`.
Configuration menu - View commit details
-
Copy full SHA for 2a13b24 - Browse repository at this point
Copy the full SHA 2a13b24View commit details
Commits on Feb 9, 2020
-
Properly use parent generics for opaque types
Fixes rust-lang#67844 Previously, opaque types would only get parent generics if they a return-position-impl-trait (e.g. `fn foo<A>() -> impl MyTrait<A>`). However, it's possible for opaque types to be nested inside one another: ```rust trait WithAssoc { type AssocType; } trait WithParam<A> {} type Return<A> = impl WithAssoc<AssocType = impl WithParam<A>>; ``` When this occurs, we need to ensure that the nested opaque types properly inherit generic parameters from their parent opaque type. This commit fixes the `generics_of` query to take the parent item into account when determining the generics for an opaque type.
Configuration menu - View commit details
-
Copy full SHA for a60669d - Browse repository at this point
Copy the full SHA a60669dView commit details
Commits on Feb 11, 2020
-
*Total -- 10.65kb -> 8.44kb (20.82%) /src/etc/installer/gfx/rust-logo.png -- 5.71kb -> 3.82kb (33.11%) /src/librustdoc/html/static/down-arrow.svg -- 0.63kb -> 0.50kb (20.44%) /src/librustdoc/html/static/wheel.svg -- 3.86kb -> 3.68kb (4.66%) /src/librustdoc/html/static/brush.svg -- 0.47kb -> 0.44kb (4.61%) Signed-off-by: ImgBotApp <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c18476e - Browse repository at this point
Copy the full SHA c18476eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 34cf0b3 - Browse repository at this point
Copy the full SHA 34cf0b3View commit details -
Micro-optimize the heck out of LEB128 reading and writing.
This commit makes the following writing improvements: - Removes the unnecessary `write_to_vec` function. - Reduces the number of conditions per loop from 2 to 1. - Avoids a mask and a shift on the final byte. And the following reading improvements: - Removes an unnecessary type annotation. - Fixes a dangerous unchecked slice access. Imagine a slice `[0x80]` -- the current code will read past the end of the slice some number of bytes. The bounds check at the end will subsequently trigger, unless something bad (like a crash) happens first. The cost of doing bounds check in the loop body is negligible. - Avoids a mask on the final byte. And the following improvements for both reading and writing: - Changes `for` to `loop` for the loops, avoiding an unnecessary condition on each iteration. This also removes the need for `leb128_size`. All of these changes give significant perf wins, up to 5%.
Configuration menu - View commit details
-
Copy full SHA for ad7802f - Browse repository at this point
Copy the full SHA ad7802fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f6fb33 - Browse repository at this point
Copy the full SHA 1f6fb33View commit details -
Suggestion when encountering assoc types from hrtb
When encountering E0212, detect whether this is a representable case or not, i.e. if it's happening on an `fn` or on an ADT. If the former, provide a structured suggestion, otherwise note that this can't be represented in Rust.
Configuration menu - View commit details
-
Copy full SHA for 24be307 - Browse repository at this point
Copy the full SHA 24be307View commit details -
Configuration menu - View commit details
-
Copy full SHA for bde9677 - Browse repository at this point
Copy the full SHA bde9677View commit details
Commits on Feb 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 33e2c1d - Browse repository at this point
Copy the full SHA 33e2c1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c39b04e - Browse repository at this point
Copy the full SHA c39b04eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a852fb7 - Browse repository at this point
Copy the full SHA a852fb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80cdb0a - Browse repository at this point
Copy the full SHA 80cdb0aView commit details -
Account for
Pin::new(_)
andPin::new(Box::new(_))
when `Box::pin(……_)` would be applicable
Configuration menu - View commit details
-
Copy full SHA for c376fc0 - Browse repository at this point
Copy the full SHA c376fc0View commit details
Commits on Feb 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 248f5a4 - Browse repository at this point
Copy the full SHA 248f5a4View commit details -
Rollup merge of rust-lang#67642 - Mark-Simulacrum:relax-bounds, r=Ama…
…nieu Relax bounds on HashMap/HashSet These APIs changed from the old bound listed to the new bound (possibly empty): K: Hash + Eq -> K * new * with_capacity K: Eq + Hash, S: BuildHasher -> K, S * with_hasher * with_capacity_and_hasher * hasher K: Eq + Hash + Debug -> K: Debug S: BuildHasher -> S HashMap as Debug K: Eq + Hash -> K S: BuildHasher + Default -> S: Default HashMap as Default Resolves rust-lang#44777.
Configuration menu - View commit details
-
Copy full SHA for 2a20133 - Browse repository at this point
Copy the full SHA 2a20133View commit details -
Rollup merge of rust-lang#68848 - nnethercote:hasten-macro-parsing, r…
…=petrochenkov Hasten macro parsing r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for 87ba8f2 - Browse repository at this point
Copy the full SHA 87ba8f2View commit details -
Rollup merge of rust-lang#69008 - Aaron1011:fix/opaque-ty-parent, r=m…
…atthewjasper Properly use parent generics for opaque types Fixes rust-lang#67844 Previously, opaque types would only get parent generics if they a return-position-impl-trait (e.g. `fn foo<A>() -> impl MyTrait<A>`). However, it's possible for opaque types to be nested inside one another: ```rust trait WithAssoc { type AssocType; } trait WithParam<A> {} type Return<A> = impl WithAssoc<AssocType = impl WithParam<A>>; ``` When this occurs, we need to ensure that the nested opaque types properly inherit generic parameters from their parent opaque type. This commit fixes the `generics_of` query to take the parent item into account when determining the generics for an opaque type.
Configuration menu - View commit details
-
Copy full SHA for e9f391e - Browse repository at this point
Copy the full SHA e9f391eView commit details -
Rollup merge of rust-lang#69048 - estebank:hrlt-assoc, r=nagisa
Suggestion when encountering assoc types from hrtb When encountering E0212, detect whether this is a representable case or not, i.e. if it's happening on an `fn` or on an ADT. If the former, provide a structured suggestion, otherwise note that this can't be represented in Rust. Fix rust-lang#69000.
Configuration menu - View commit details
-
Copy full SHA for 8d00adf - Browse repository at this point
Copy the full SHA 8d00adfView commit details -
Rollup merge of rust-lang#69049 - pthariensflame:improvement/imgbot, …
…r=GuillaumeGomez Optimize image sizes This was done by [ImgBot](https://imgbot.net/) on my own fork, which I then immediately merged and turned into this manual pull request. Below is reproduced [ImgBot's own message](pthariensflame#3 (comment)) on the content of this PR. r? @steveklabnik since this is a documentation PR, I guess. --- > ## Beep boop. Your images are optimized! > > Your image file size has been reduced by **21%** 🎉 > > <details> > <summary> > Details > </summary> > > | File | Before | After | Percent reduction | > |:--|:--|:--|:--| > | /src/etc/installer/gfx/rust-logo.png | 5.71kb | 3.82kb | 33.11% | > | /src/librustdoc/html/static/down-arrow.svg | 0.63kb | 0.50kb | 20.44% | > | /src/librustdoc/html/static/wheel.svg | 3.86kb | 3.68kb | 4.66% | > | /src/librustdoc/html/static/brush.svg | 0.47kb | 0.44kb | 4.61% | > | | | | | > | **Total :** | **10.65kb** | **8.44kb** | **20.82%** | > </details> > > --- > > [📝docs](https://imgbot.net/docs) | [:octocat: repo](https://github.com/dabutvin/ImgBot) | [🙋issues](https://github.com/dabutvin/ImgBot/issues) | [🏅swag](https://goo.gl/forms/1GX7wlhGEX8nkhGO2) | [🏪marketplace](https://github.com/marketplace/imgbot)
Configuration menu - View commit details
-
Copy full SHA for 53a790c - Browse repository at this point
Copy the full SHA 53a790cView commit details -
Rollup merge of rust-lang#69050 - nnethercote:micro-optimize-leb128, …
…r=michaelwoerister Micro-optimize the heck out of LEB128 reading and writing. This commit makes the following writing improvements: - Removes the unnecessary `write_to_vec` function. - Reduces the number of conditions per loop from 2 to 1. - Avoids a mask and a shift on the final byte. And the following reading improvements: - Removes an unnecessary type annotation. - Fixes a dangerous unchecked slice access. Imagine a slice `[0x80]` -- the current code will read past the end of the slice some number of bytes. The bounds check at the end will subsequently trigger, unless something bad (like a crash) happens first. The cost of doing bounds check in the loop body is negligible. - Avoids a mask on the final byte. And the following improvements for both reading and writing: - Changes `for` to `loop` for the loops, avoiding an unnecessary condition on each iteration. This also removes the need for `leb128_size`. All of these changes give significant perf wins, up to 5%. r? @michaelwoerister
Configuration menu - View commit details
-
Copy full SHA for a50a896 - Browse repository at this point
Copy the full SHA a50a896View commit details -
Rollup merge of rust-lang#69068 - Goirad:make-sgx-arg-cleanup-nop, r=…
…jethrogb,nagisa Make the SGX arg cleanup implementation a NOP fixes rust-lang#64304 cc @jethrogb
Configuration menu - View commit details
-
Copy full SHA for 2501a10 - Browse repository at this point
Copy the full SHA 2501a10View commit details -
Rollup merge of rust-lang#69082 - estebank:boxfuture-box-pin, r=tmandry
When expecting `BoxFuture` and using `async {}`, suggest `Box::pin` Fix rust-lang#68197, cc rust-lang#69083.
Configuration menu - View commit details
-
Copy full SHA for ec5bf15 - Browse repository at this point
Copy the full SHA ec5bf15View commit details -
Rollup merge of rust-lang#69104 - tmiasko:configure-cmake, r=Mark-Sim…
…ulacrum bootstrap: Configure cmake when building sanitizer runtimes Configure cmake before building sanitizer runtimes in similar way it is already configured elsewhere, to ensure that they are built with expected compiler flags. Previously this step has been intentionally omitted since sanitizer runtimes are built as universal binaries on Darwin targets, which in turn are unsupported by sccache which is also configured there. To avoid the issue everything but the compiler launcher is configured. Helps with rust-lang#68863.
Configuration menu - View commit details
-
Copy full SHA for 1ddf250 - Browse repository at this point
Copy the full SHA 1ddf250View commit details