-
Notifications
You must be signed in to change notification settings - Fork 13k
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 16 pull requests #54457
Rollup of 16 pull requests #54457
Conversation
Let cargo handle that for us Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Currently, `BitSet` doesn't actually know its own domain size; it just knows how many words it contains. To improve things, this commit makes the following changes. - It changes `BitSet` and `SparseBitSet` to store their own domain size, and do more precise bounds and same-size checks with it. It also changes the signature of `BitSet::to_string()` (and puts it within `impl ToString`) now that the domain size need not be passed in from outside. - It uses `derive(RustcDecodable, RustcEncodable)` for `BitSet`. This required adding code to handle `PhantomData` in `libserialize`. - As a result, it removes the domain size from `HybridBitSet`, making a lot of that code nicer. - Both set_up_to() and clear_above() were overly general, working with arbitrary sizes when they are only needed for the domain size. The commit removes the former, degeneralizes the latter, and removes the (overly general) tests. - Changes `GrowableBitSet::grow()` to `ensure()`, fixing a bug where a (1-based) domain size was confused with a (0-based) element index. - Changes `BitMatrix` to store its row count, and do more precise bounds checks with it. - Changes `ty_params` in `select.rs` from a `BitSet` to a `GrowableBitSet` because it repeatedly failed the new, more precise bounds checks. (Changing the type was simpler than computing an accurate domain size.) - Various other minor improvements.
This is a safe wrapper around ptr::copy, for regions within a single slice. Previously, safe in-place copying was only available as a side effect of Vec::drain.
The no_default_libraries was introduced in rust-lang#28578 because the NetBSD-based rumprun needed to disable the link flag. This moves the definition to be used by all NetBSD linker flavors to close rust-lang#49627. A different solution would be adding -lc but as there is no platform with explicit -lc, this approach is used.
Profiling shows that the `(reader, writer, used)` triples used by liveness analysis almost always have invalid `reader` and `writer` fields. We can take advantage of this knowledge to use a compressed representation for them, falling back to a secondary table for the uncommon cases. This change reduces instruction counts on numerous benchmarks, the best by 16%. It also reduces max-rss on numerous benchmarks, the best by 38%. The patch also renames these triples from `Users` to `RWU`, because it's confusing having a type whose name is plural and then used within vectors whose names are also plural.
…chton define copy_within on slices This is a safe wrapper around `ptr::copy`, for regions within a single slice. Previously, safe in-place copying was only available as a side effect of `Vec::drain`. I've wanted this API a couple times in the past, and I figured I'd just whip up a PR to help discuss it. It's possible something like this exists elsewhere and I just missed it. It might also be a big enough addition to warrant an RFC, I'm not sure.
…nkov Make `dyn` a keyword in the 2018 edition Proposed in rust-lang#44662 (comment).
…richton remove (more) CAS API from Atomic* types where not natively supported closes rust-lang#54276 In PR rust-lang#51953 I made the Atomic* types available on targets like thumbv6m and msp430 with the intention of *only* exposing the load and store API on those types -- the rest of the API doesn't work on those targets because the are no native instructions to implement CAS loops. Unfortunately, it seems I didn't properly cfg away all the CAS API on those targets, as evidenced in rust-lang#54276. This PR amends the issue by removing the rest of the CAS API. This is technically a breaking change because *libraries* that were using this API and were being compiled for e.g. thumbv6m-none-eabi will stop compiling. However, using those libraries (before this change) in programs (binaries) would lead to linking errors when compiled for e.g. thumbv6m so this change effectively shifts a linker error in binaries to a compiler error in libraries. On a side note: extending the Atomic API is a bit error prone because of these non-cas targets. Unless the author of the change is aware of these targets and properly uses `#[cfg(atomic = "cas")]` they could end up exposing new CAS API on these targets. I can't think of a test to check that an API is not present on some target, but we could extend the `tidy` tool to check that *all* newly added atomic API has the `#[cfg(atomic = "cas")]` attribute unless it's whitelisted in `tidy` then the author of the change would have to verify if the API can be used on non-cas targets. In any case, I'd like to plug this hole ASAP. We can revisit testing in a follow-up issue / PR. r? @alexcrichton cc @mvirkkunen
rustbuild: drop color handling Let cargo handle that for us Fixes rust-lang#54322 Needs a beta backport
…est, r=steveklabnik Support specifying edition in doc test Fixes rust-lang#52623 r? @QuietMisdreavus
…ikomatsakis Improve handling of type bounds in `bit_set.rs`. Currently, `BitSet` doesn't actually know its own domain size; it just knows how many words it contains. We can make it better.
… r=GuillaumeGomez add -Zui-testing to rustdoc Before we depend on the `rustdoc-ui` tests some more, let's make rustdoc act the same as the compiler when they're actually being executed.
…crichton Make 'proc_macro::MultiSpan' public. Oversight from rust-lang#52896.
Use no_default_libraries for all NetBSD flavors The no_default_libraries was introduced in rust-lang#28578 because the NetBSD-based rumprun needed to disable the link flag. This moves the definition to be used by all NetBSD linker flavors to close rust-lang#49627. A different solution would be adding -lc but as there is no platform with explicit -lc, this approach is used.
Detect `for _ in in bar {}` typo Fix rust-lang#36611, rust-lang#52964, without modifying the parsing of emplacement `in` to avoid further problems like rust-lang#50832.
…tebank add applicability to span_suggestion call Found another `span_suggestion` call. Issue rust-lang#50723 r? @estebank
…tebank Add UI test for deref recursion limit printing twice Closes rust-lang#38940 Does ``NOTE`` in the test need to be changed to ``HELP`` if its in the stderr? ``help: consider adding a `#![recursion_limit="20"]` attribute to your crate`` It doesn't appear to complaining locally that the line isn't set to ``HELP`` in the test, and the guide says > HELP and SUGGESTION* > * Note: SUGGESTION must follow immediately after HELP. yet there's no concrete suggestion emitted. r? @estebank
parser: Tweak function parameter parsing to avoid rollback on succesfull path Since rollback is not perfect and may e.g. leave non-fatal errors after it, we need to make sure compilation fails if it happens. So in particular case of `fn parse_arg_general` we need to parse the "good" `TYPE` first and only then rollback and recover erroneous `PAT: TYPE` if necessary. Found when working on rust-lang/rfcs#2544 (comment). r? @ghost
…tsakis Compress `Liveness` data some more. Profiling shows that the `(reader, writer, used)` triples used by liveness analysis almost always have invalid `reader` and `writer` fields. We can take advantage of this knowledge to use a compressed representation for them, falling back to a secondary table for the uncommon cases. This change reduces instruction counts on numerous benchmarks, the best by 16%. It also reduces max-rss on numerous benchmarks, the best by 38%. The patch also renames these triples from `Users` to `RWU`, because it's confusing having a type whose name is plural and then used within vectors whose names are also plural. r? @nikomatsakis
…Simulacrum Simplify slice's first(_mut) and last(_mut) with get This change makes these functions easier to read and interpret. I haven't detected any difference in performance locally. r? @Mark-Simulacrum
Unify christianpoveda's emails
@bors r+ p=16 |
📌 Commit 48ec53c has been approved by |
Rollup of 16 pull requests Successful merges: - #53652 (define copy_within on slices) - #54261 (Make `dyn` a keyword in the 2018 edition) - #54280 (remove (more) CAS API from Atomic* types where not natively supported) - #54323 (rustbuild: drop color handling) - #54350 (Support specifying edition in doc test) - #54370 (Improve handling of type bounds in `bit_set.rs`.) - #54371 (add -Zui-testing to rustdoc) - #54374 (Make 'proc_macro::MultiSpan' public.) - #54402 (Use no_default_libraries for all NetBSD flavors) - #54409 (Detect `for _ in in bar {}` typo) - #54412 (add applicability to span_suggestion call) - #54413 (Add UI test for deref recursion limit printing twice) - #54415 (parser: Tweak function parameter parsing to avoid rollback on succesfull path) - #54420 (Compress `Liveness` data some more.) - #54422 (Simplify slice's first(_mut) and last(_mut) with get) - #54446 (Unify christianpoveda's emails) Failed merges: - #54058 (Introduce the partition_dedup/by/by_key methods for slices) r? @ghost
💔 Test failed - status-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 |
@bors retry |
Rollup of 16 pull requests Successful merges: - #53652 (define copy_within on slices) - #54261 (Make `dyn` a keyword in the 2018 edition) - #54280 (remove (more) CAS API from Atomic* types where not natively supported) - #54323 (rustbuild: drop color handling) - #54350 (Support specifying edition in doc test) - #54370 (Improve handling of type bounds in `bit_set.rs`.) - #54371 (add -Zui-testing to rustdoc) - #54374 (Make 'proc_macro::MultiSpan' public.) - #54402 (Use no_default_libraries for all NetBSD flavors) - #54409 (Detect `for _ in in bar {}` typo) - #54412 (add applicability to span_suggestion call) - #54413 (Add UI test for deref recursion limit printing twice) - #54415 (parser: Tweak function parameter parsing to avoid rollback on succesfull path) - #54420 (Compress `Liveness` data some more.) - #54422 (Simplify slice's first(_mut) and last(_mut) with get) - #54446 (Unify christianpoveda's emails) Failed merges: - #54058 (Introduce the partition_dedup/by/by_key methods for slices) r? @ghost
☀️ Test successful - status-appveyor, status-travis |
Successful merges:
dyn
a keyword in the 2018 edition #54261 (Makedyn
a keyword in the 2018 edition)bit_set.rs
. #54370 (Improve handling of type bounds inbit_set.rs
.)for _ in in bar {}
typo #54409 (Detectfor _ in in bar {}
typo)Liveness
data some more. #54420 (CompressLiveness
data some more.)Failed merges:
r? @ghost