Rollup of 6 pull requests - #161986
Closed
JonathanBrouwer wants to merge 13 commits into
Closed
Conversation
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
Member
Author
|
@bors r+ p=5 |
Contributor
Member
Author
|
Trying commonly failed jobs |
This comment has been minimized.
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
Member
|
Closing in favor of #161990. |
Contributor
|
This pull request was unapproved due to being closed. |
Contributor
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
alloc#160941 (Enforce safety comments onalloc)Failed merges:
drop_guardin some places in {core,alloc,std} #161702 (Usedrop_guardin some places in {core,alloc,std})r? @ghost
Create a similar rollup