-
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 16 pull requests #84975
Closed
Closed
Rollup of 16 pull requests #84975
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensure that `write` and `write_all` can be inlined and that their commonly executed fast paths can be as short as possible. `write_vectored` would likely benefit from the same optimization, but I omitted it because its implementation is more complex, and I don't have a benchmark on hand to guide its optimization.
We use a Vec as our internal, constant-sized buffer, but the overhead of using methods like `extend_from_slice` can be enormous, likely because they don't get inlined, because `Vec` has to repeat bounds checks that we've already done, and because it makes considerations for things like reallocating, even though they should never happen.
Optimize for the common case where the input write size is less than the buffer size. This slightly increases the cost for pathological write patterns that commonly fill the buffer exactly, but if a client is doing that frequently, they're already paying the cost of frequent flushing, etc., so the cost is of this optimization to them is relatively small.
I came up with this idea ages ago, but rustdoc used to ICE on it. Now it doesn't.
This extracts a new `parse_cfg` function that's used between both. - Treat `#[doc(cfg(x), cfg(y))]` the same as `#[doc(cfg(x)] #[doc(cfg(y))]`. Previously it would be completely ignored. - Treat `#[doc(inline, cfg(x))]` the same as `#[doc(inline)] #[doc(cfg(x))]`. Previously, the cfg would be ignored. - Pass the cfg predicate through to rustc_expand to be validated Co-authored-by: Vadim Petrochenkov <[email protected]>
This should fix linking of other C code (and soon Rust-generated code) on aarch64 musl.
And also add backticks around `MaybeUninit`.
That PR caused multiple test failures when Rust's channel is changed from nightly to anything else. The commit will have to be landed again after the test suite is fixed.
using allow_internal_unstable (as recommended) Fixes: rust-lang#84836 ```shell $ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc src/test/run-make-fulldeps/coverage/no_cov_crate.rs error[E0554]: `#![feature]` may not be used on the dev release channel --> src/test/run-make-fulldeps/coverage/no_cov_crate.rs:2:1 | 2 | #![feature(no_coverage)] | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0554`. ```
I just need this until rustbuild supports -Cpanic=abort std directly.
… r=m-ou-se Optimize BufWriter
…, r=m-ou-se Stablize {HashMap,BTreeMap}::into_{keys,values} I would propose to stabilize `{HashMap,BTreeMap}::into_{keys,values}`( aka. `map_into_keys_values`). Closes rust-lang#75294.
Unify rustc and rustdoc parsing of `cfg()` This extracts a new `parse_cfg` function that's used between both. - Treat `#[doc(cfg(x), cfg(y))]` the same as `#[doc(cfg(x)] #[doc(cfg(y))]`. Previously it would be completely ignored. - Treat `#[doc(inline, cfg(x))]` the same as `#[doc(inline)] #[doc(cfg(x))]`. Previously, the cfg would be ignored. - Pass the cfg predicate through to rustc_expand to be validated Technically this is a breaking change, but doc_cfg is still nightly so I don't think it matters. Fixes rust-lang#84437. r? ``````@petrochenkov``````
Cleanup of `wasm` Some more cleanup of `sys`, this time `wasm` - Reuse `unsupported::args` (functionally equivalent implementation, just an empty iterator). - Split out `atomics` implementation of `wasm::thread`, the non-`atomics` implementation is reused from `unsupported`. - Move all of the `atomics` code to a separate directory `wasm/atomics`. `@rustbot` label: +T-libs-impl r? `@m-ou-se`
Simplify chdir implementation and minimize unsafe block
…=Mark-Simulacrum Add `needs-unwind` and beginning of support for testing `panic=abort` std to compiletest For the Fuchsia platform we build libstd with `panic=abort` and would like a way to run tests with that enabled. This adds low-level support for this directly to compiletest. In the future I'd like to add high-level support in rustbuild, e.g. having target-specific flags that allow configuring a panic strategy. (Side note: It would be nice if we could also build multiple configurations for the same target, but I'm getting ahead of myself.) This plus rust-lang#84500 have everything that's needed to get ui tests passing on fuchsia targets. Part of rust-lang#84766. Note that this change only includes the header on tests which need an unwinder to _build_, not those which need it to _run_. r? `@Mark-Simulacrum`
Allow using `core::` in intra-doc links within core itself I came up with this idea ages ago, but rustdoc used to ICE on it. Now it doesn't. Helps with rust-lang#73445. Doesn't fix it completely since `extern crate self as std;` in std still gives strange errors.
…ns, r=Amanieu Update compiler-builtins to 0.1.42 to get fix for outlined atomics This should fix linking of other C code (and soon Rust-generated code) on aarch64 musl.
…=jonas-schievink ⬆️ rust-analyzer
…, r=nagisa Disallows `#![feature(no_coverage)]` on stable and beta (using standard crate-level gating) Fixes: rust-lang#84836 Removes the function-level feature gating solution originally implemented, and solves the same problem using `allow_internal_unstable`, so normal crate-level feature gating mechanism can still be used (which disallows the feature on stable and beta). I tested this, building the compiler with and without `CFG_DISABLE_UNSTABLE_FEATURES=1` With unstable features disabled, I get the expected result as shown here: ```shell $ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc src/test/run-make-fulldeps/coverage/no_cov_crate.rs error[E0554]: `#![feature]` may not be used on the dev release channel --> src/test/run-make-fulldeps/coverage/no_cov_crate.rs:2:1 | 2 | #![feature(no_coverage)] | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0554`. ``` r? `@Mark-Simulacrum` cc: `@tmandry` `@wesleywiser`
Handle incorrect placement of parentheses in trait bounds more gracefully Fix rust-lang#84772. CC ```@jonhoo```
CTFE engine: rename copy → copy_intrinsic, move to intrinsics.rs The `copy` name is confusing for this function because we also have `copy_op` which is pretty different. I hope `copy_intrinsic` is clearer. Also `step.rs` should really just contain the main loop and opcode dispatch, so move this helper function to a more appropriate place. r? ```@oli-obk```
…chenkov Only compute Obligation `cache_key` once in `register_obligation_at`
…etrochenkov E0583: Include secondary path in error message Fixes rust-lang#84819.
Fix typo in `MaybeUninit::array_assume_init` safety comment And also add backticks around `MaybeUninit`.
…rk-Simulacrum Revert PR 83866 rust-lang#83866 caused multiple test failures when Rust's channel is changed from nightly to anything else. The PR will have to be landed again after the test suite is fixed. The two kinds of test failures were: * Rustdoc tests failed because the links in the generated HTML didn't point at nightly anymore, see rust-lang#84909 (comment) * Rustdoc UI tests failed because the links included in error messages didn't point at nightly anymore, see rust-lang#84909 (comment) r? `@Mark-Simulacrum` cc `@jyn514`
@bors r+ p=5 rollup=never |
📌 Commit ab65989 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
May 6, 2021
⌛ Testing commit ab65989 with merge f41eca4aca01022749feb44a12cd4f2e500a5807... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
May 6, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
cfg()
#84442 (Unify rustc and rustdoc parsing ofcfg()
)wasm
#84655 (Cleanup ofwasm
)needs-unwind
and beginning of support for testingpanic=abort
std to compiletest #84734 (Addneeds-unwind
and beginning of support for testingpanic=abort
std to compiletest)core::
in intra-doc links within core itself #84755 (Allow usingcore::
in intra-doc links within core itself)#![feature(no_coverage)]
on stable and beta (using standard crate-level gating) #84871 (Disallows#![feature(no_coverage)]
on stable and beta (using standard crate-level gating))cache_key
once inregister_obligation_at
#84923 (Only compute Obligationcache_key
once inregister_obligation_at
)MaybeUninit::array_assume_init
safety comment #84949 (Fix typo inMaybeUninit::array_assume_init
safety comment)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup