Skip to content

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lilasta and others added 21 commits November 24, 2021 13:05
Make `intrinsics::write_bytes` const

This is required to constify `MaybeUninit::zeroed` and `(*mut T)::write_bytes`.

Tracking issue: rust-lang#86302
asm: Allow using r9 (ARM) and x18 (AArch64) if they are not reserved by the current target

This supersedes rust-lang#88879.

cc `@Skirmisher`

r? `@joshtriplett`
… r=joshtriplett

Make certain panicky stdlib functions behave better under panic_immediate_abort

The stdlib has a `panic_immediate_abort` feature that turns panics into immediate aborts, without any formatting/display logic. This feature was [introduced](rust-lang#55011) primarily for codesize-constrained situations.

Unfortunately, this win doesn't quite propagate to `Result::expect()` and `Result::unwrap()`, while the formatting machinery is reduced, `expect()` and `unwrap()` both call `unwrap_failed("msg", &err)` which has a signature of `fn unwrap_failed(msg: &str, error: &dyn fmt::Debug)` and is `#[inline(never)]`. This means that `unwrap_failed` will unconditionally construct a `dyn Debug` trait object even though the object is never used in the function.

Constructing a trait object (even if you never call a method on it!) forces rust to include the vtable and any dependencies. This means that in `panic_immediate_abort` mode, calling expect/unwrap on a Result will pull in a whole bunch of formatting code for the error type even if it's completely unused.

This PR swaps out the function with one that won't require a trait object such that it won't force the inclusion of vtables in the code. It also gates off `#[inline(never)]` in a bunch of other places where allowing the inlining of an abort may be useful (this kind of thing is already done elsewhere in the stdlib).

I don't know how to write a test for this; we don't really seem to have any tests for `panic_immediate_abort` anyway so perhaps it's fine as is.
…it-mut_t_is_not_ref_t, r=Mark-Simulacrum

rustdoc: Add regression test for Iterator as notable trait on &T

Closes rust-lang#78160

This regression test is different from the one in rust-lang#91748, because while neither of these function should have Iterator marked as a notable trait, the reasons are different.

* In this PR, it returns `&T where T: Iterator`. The `mut` is what's missing.
* In rust-lang#91748, it returns `&mut T`. The trait bounds are what's missing.
Do not ICE when suggesting elided lifetimes on non-existent spans.

Fixes rust-lang#91763

r? `@jackh726`
…imulacrum

Fix zero-sized reference to deallocated memory

fixes rust-lang#91772

r? `@camelid`
Make `Unique`s methods `const`

Tracking issue: None
@rustbot rustbot added the rollup A PR which is a rollup label Dec 11, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Collaborator

bors commented Dec 11, 2021

📌 Commit 9031ac4 has been approved by matthiaskrgr

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 11, 2021
@bors
Copy link
Collaborator

bors commented Dec 12, 2021

⌛ Testing commit 9031ac4 with merge e70e4d4...

@bors
Copy link
Collaborator

bors commented Dec 12, 2021

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing e70e4d4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 12, 2021
@bors bors merged commit e70e4d4 into rust-lang:master Dec 12, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 12, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e70e4d4): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@matthiaskrgr matthiaskrgr deleted the rollup-nryyeyj branch December 12, 2021 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants