Skip to content

Fix panic for doc attributes on where predicates#155864

Merged
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
JonathanBrouwer:doc-attr-span
Apr 27, 2026
Merged

Fix panic for doc attributes on where predicates#155864
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
JonathanBrouwer:doc-attr-span

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer commented Apr 27, 2026

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 27, 2026

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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. labels Apr 27, 2026
//~^ ERROR most attributes are not supported in `where` clauses
():,

// == That the doc attributes below don't trigger the error is a bug
Copy link
Copy Markdown
Contributor Author

@JonathanBrouwer JonathanBrouwer Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bug is not caused by this PR, but I did decide to document the bug in a test and I will make a follow-up PR to address it

View changes since the review

@GuillaumeGomez
Copy link
Copy Markdown
Member

Neat, thanks!

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 27, 2026

📌 Commit 75fa098 has been approved by GuillaumeGomez

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 Apr 27, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 27, 2026
…uillaumeGomez

Fix panic for doc attributes on where predicates

Fixes rust-lang#155804

r? @GuillaumeGomez
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 27, 2026
…uillaumeGomez

Fix panic for doc attributes on where predicates

Fixes rust-lang#155804

r? @GuillaumeGomez
rust-bors Bot pushed a commit that referenced this pull request Apr 27, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #152487 (core: drop unmapped ZSTs in array `map`)
 - #155716 (arm64e: set ptrauth ABI subtype on lib.rmeta Mach-O objects)
 - #155864 (Fix panic for doc attributes on where predicates)
 - #155865 (add test for accidentally fixed `binius_field` issue)
rust-bors Bot pushed a commit that referenced this pull request Apr 27, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #154465 (triagebot: Mention 'subtree' in clippy message)
 - #155355 (Fix pathological performance in trait solver cycles with errors)
 - #155716 (arm64e: set ptrauth ABI subtype on lib.rmeta Mach-O objects)
 - #155864 (Fix panic for doc attributes on where predicates)
 - #155865 (add test for accidentally fixed `binius_field` issue)
 - #155866 (Render `ConstContext` for diagnostics once)
@rust-bors rust-bors Bot merged commit 30f08d3 into rust-lang:main Apr 27, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: can't get the span of an arbitrary parsed attribute

3 participants