Skip to content

Rollup of 6 pull requests - #161986

Closed
JonathanBrouwer wants to merge 13 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-7Gppi6o
Closed

Rollup of 6 pull requests#161986
JonathanBrouwer wants to merge 13 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-7Gppi6o

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

mejrs and others added 13 commits August 28, 2026 21:33
safety comments in alloc

this was pain and it's not even half i think

oepsje woepsje
While fuzzing I noticed we would now ICE in two places when encountering an empty or filled `#![rustc_never_type_options()]` attr:

compiler/rustc_passes/src/check_attr.rs:160:33: builtin attribute "rustc_never_type_options" not handled by `CheckAttrVisitor`
compiler/rustc_attr_parsing/src/validate_attr.rs:42:17: assertion failed: lint_attrs.contains(name)

So remove these two entries after which we will just error with `error: cannot find attribute`
After the first move_suffix in Root::split_off, the source and result
trees share values through two temporarily invalid structures. If a
later key comparison panics, unwinding leaves the map with a stale
length over a partially detached tree, and consuming iteration then
double-frees the shared values, reachable from safe code.

Guard the descent loop with a mem::DropGuard that aborts on unwind,
armed before the first move_suffix and dismissed once the borders are
fixed.
…rfonthey

Enforce safety comments on `alloc`

cc @clarfonthey, @workingjubilee. Following up from rust-lang#160824. I spent a painfully long time going over the comments and ensuring there's nothing too awful ^^

r? clarfonthey
…anic-safety, r=nia-e

Abort instead of unwinding out of an inconsistent BTreeMap::split_off

Fixes rust-lang#158165. Supersedes rust-lang#161784, which I had to abandon after a bad force-push from a shallow clone left its head detached.

`BTreeMap::split_off` runs the caller's `Ord`/`Borrow` impl via `search_node` inside `Root::split_off`'s descent. After the first `move_suffix`, the two roots alias the same values through structurally invalid trees until the borders are fixed; a comparator panic there unwinds with a stale length and double-frees on later iteration or drop. It is reachable from `#![forbid(unsafe_code)]` on stable (reproducer on the issue).

Guard the descent loop with an abort-on-panic `PanicGuard`, as `btree::mem::replace` already does. `catch_unwind` isnt available in `alloc` (no_std), and I kept an inline guard rather than the unstable `DropGuard`. It is armed once before the loop; the first `search_node` stays outside it, since a panic there can still unwind safely (nothing has moved yet).

Verified with Miri: the reproducer goes from a double-free to a clean abort, and normal multi-level splits are unaffected. Adds a happy-path regression test.

Credit to @ostrowr for the report and to rust-lang#158710 for the original approach.

r? @nia-e
…iguous-glob-subtrait, r=fmease

Preserve ambiguous glob lint for subtrait method picks

Fixes rust-lang#157965
…onathanbrouwer

rework handling of doc attributes on macro calls

 rust-lang#160904 but with the fcw changes removed

r? @JonathanBrouwer
…g, r=fmease

rustdoc: Take into account edition information for keyword highlighting

Fixes rust-lang#148221.

The only thing that was missing was passing down an `Edition` to the highlighter (and adding tests).

r? @fmease
remove rustc_never_type_options attr remnants

While fuzzing I noticed we would now ICE in two places when encountering an empty or filled `#![rustc_never_type_options()]` attr:

compiler/rustc_passes/src/check_attr.rs:160:33: builtin attribute "rustc_never_type_options" not handled by `CheckAttrVisitor`
compiler/rustc_attr_parsing/src/validate_attr.rs:42:17: assertion failed: lint_attrs.contains(name)

So remove these two entries after which we will just error with `error: cannot find attribute`

r? @WaffleLapkin
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 29, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-tidy Area: The tidy tool 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-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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Aug 29, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors

rust-bors Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d4db1e9 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple-1,aarch64-apple-2,x86_64-mingw-1,i686-msvc-1,i686-msvc-2

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 29, 2026
Rollup of 6 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple-1
try-job: aarch64-apple-2
try-job: x86_64-mingw-1
try-job: i686-msvc-1
try-job: i686-msvc-2
@GuillaumeGomez

Copy link
Copy Markdown
Member

Closing in favor of #161990.

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 29, 2026
@rust-bors

rust-bors Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors

rust-bors Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 2a6ee25 (2a6ee256ed449f46e95bf7667aa8e1c9a3a27977)
Base parent: bdf8733 (bdf8733e4015150673f095b2725fe4c435a8daa4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-tidy Area: The tidy tool rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants