-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 #91813
Rollup of 8 pull requests #91813
Conversation
the current target.
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`
Remove hir::Node::hir_id. Small cleanup.
…imulacrum Fix zero-sized reference to deallocated memory fixes rust-lang#91772 r? `@camelid`
Make `Unique`s methods `const` Tracking issue: None
@bors r+ rollup=never p=8 |
📌 Commit 9031ac4 has been approved by |
☀️ Test successful - checks-actions |
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 |
Successful merges:
intrinsics::write_bytes
const #90081 (Makeintrinsics::write_bytes
const)Unique
s methodsconst
#91806 (MakeUnique
s methodsconst
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup