Skip to content

Rollup of 9 pull requests - #163467

Closed
tgross35 wants to merge 29 commits into
rust-lang:mainfrom
tgross35:rollup-Pvr5y7a
Closed

tgross35 wants to merge 29 commits into
rust-lang:mainfrom
tgross35:rollup-Pvr5y7a

Conversation

@tgross35

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

tgross35 and others added 29 commits August 25, 2026 22:39
`funnel_shl` and `funnel_shr` have been around for close to a year, the
unchecked versions for a number of months. These are reasonably small
and uncontroversial, and it can be tricky to get similar performance
with a fallback; stabilize them here.

Newly stable API:

    impl {u8, u16, u32, u64, u128, usize} {
        pub const fn funnel_shl(self, right: Self, shift: u32) -> Self;
        pub const fn funnel_shr(self, right: Self, shift: u32) -> Self;

        pub const unsafe fn unchecked_funnel_shl(self, right: Self, shift: u32) -> Self;
        pub const unsafe fn unchecked_funnel_shr(self, right: Self, shift: u32) -> Self;
    }

The tracking issue also mentions a `wrapping_` version but it has not
been implemented.

Tracking issue: RUST-145686
For production use, we should only link in the ubsan_minimal runtime,
instead of the complete ubsan runtime. This adds support for both
cfi-recover and cfi-diag to use the minimal runtime when
`-Zsanitizer-cfi-minimal-runtime` is specified.

This also includes tests, to ensure the flag can only be used if either
cfi-recover or cfi-diag is enabled, it doesn't disrupt the original
behavior, and links in the correct runtime when specified.

Co-Authored-By: Bastian Kersting <bkersting@google.com>
Co-Authored-By: Bastian Kersting <bkersting@google.com>
Only check `SanitizerCfiMinimalRuntimeRequiresCfiRecoverOrDiag` if CFI
is actually enabled.

Use `is_sanitizer_cfi_minimal_runtime_enabled()` helper within
`link.rs`.
…r=nia-e

Stabilize `funnel_shifts` (including `const`)

`funnel_shl` and `funnel_shr` have been around for close to a year, the unchecked versions for a number of months. These are reasonably small and uncontroversial, and it can be tricky to get similar performance with a fallback; stabilize them here.

Newly stable API:

```rust
impl {u8, u16, u32, u64, u128, usize} {
    pub const fn funnel_shl(self, right: Self, shift: u32) -> Self;
    pub const fn funnel_shr(self, right: Self, shift: u32) -> Self;

    pub const unsafe fn unchecked_funnel_shl(self, right: Self, shift: u32) -> Self;
    pub const unsafe fn unchecked_funnel_shr(self, right: Self, shift: u32) -> Self;
}
```

The tracking issue also mentions a `wrapping_` version but it has not been implemented.

Closes: rust-lang#145686 (tracking issue, wrapping versions will need a new issue)
…=rcvalle

Add support for -Zsanitizer-cfi-minimal-runtime

For production use, we should only link in the ubsan_minimal runtime,
instead of the complete ubsan runtime. This adds support for both
cfi-recover and cfi-diag to use the minimal runtime when
`-Zsanitizer-cfi-minimal-runtime` is specified.

This also includes tests, to ensure the flag can only be used if either
cfi-recover or cfi-diag is enabled, it doesn't disrupt the original
behavior, and links in the correct runtime when specified.

cc @1c3t3a

?r rcvalle
…ed-attribute-documentation, r=clarfonthey

add `automatically_derived` attribute documentation

Documents the `automatically_derived` built-in attribute in `core` via `#[doc(attribute = "automatically_derived")]`

Part of rust-lang#157604
…r=petrochenkov

do not complain about unstable target features on nightly

This was brought up in rust-lang#162235 (comment): we currently print a warning on nightly saying that using an unstable target feature will become a hard error. That's a mistake.

We could either remove the part of the warning that talks about it becoming a hard error, or we could just hide the warning entirely for unstable features on nighty. I went for the latter -- nightly is meant for experimentation with those features so having un-silenceable warnings is not great.

Cc @workingjubilee
… r=jieyouxu

Add `stable_rustc` helper in `run-make-support`

To help with rust-lang#162848 and https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Testing.20stable.20vs.20nightly.20behavior.20in.20UI.20tests/with/626329887.

For rust-lang#162848, I need to avoid passing `-Zthreads` when the compiler is supposed to act like `stable`. This refactoring makes that simpler; I will only add that flag to `Rustc::new` and not `Rustc::stable`.

r? jieyouxu
…ata, r=petrochenkov

Allow using different index types when reading and writing to tables

Make tables of metadata two-sided: one can write with one index type and read with another, as long as both those types are indexes. That will be used in rust-lang#163321 when we will have `LocalDefIndex` or similar type.

r? @petrochenkov
…, r=hanna-kruppe

Stabilize vec_try_remove

Closes rust-lang#146954 , which is has [completed its FCP with disposition to merge](rust-lang#146954 (comment)).

Hello, this is my first contribution to Rust! I was programming for fun this weekend and I was surprised that this wasn't stabilized, so I thought I would try to contribute.

Disclosure: I am making this PR in my capacity as a Canonical employee.

No LLMs were harmed in the making of this pull request.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 29, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 29, 2026
@tgross35 tgross35 closed this Sep 29, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 29, 2026
@tgross35

Copy link
Copy Markdown
Member Author

Duplicate or #163465

@tgross35
tgross35 deleted the rollup-Pvr5y7a branch September 29, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants