Skip to content

Fix ICE on non-ident path in doc(auto_cfg values)#158765

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
TaKO8Ki:fix-doc-auto-cfg-values-non-ident
Jul 6, 2026
Merged

Fix ICE on non-ident path in doc(auto_cfg values)#158765
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
TaKO8Ki:fix-doc-auto-cfg-values-non-ident

Conversation

@TaKO8Ki

@TaKO8Ki TaKO8Ki commented Jul 4, 2026

Copy link
Copy Markdown
Member

Fixes #158744

#[doc(auto_cfg(hide(a, values(::b))))] could ICE while parsing values(...) because the malformed nested meta item did not have a single identifier, but the error path still called unwrap() on sub_item.ident().

@rustbot

rustbot commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 Jul 4, 2026
@rustbot

rustbot commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: rustdoc
  • rustdoc expanded to 8 candidates
  • Random selection from GuillaumeGomez, camelid, notriddle

@JonathanBrouwer JonathanBrouwer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rust-bors

rust-bors Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 86960f5 has been approved by JonathanBrouwer

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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 Jul 4, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 5, 2026
…n-ident, r=JonathanBrouwer

Fix ICE on non-ident path in `doc(auto_cfg values)`

Fixes rust-lang#158744

`#[doc(auto_cfg(hide(a, values(::b))))]` could ICE while parsing `values(...)` because the malformed nested meta item did not have a single identifier, but the error path still called `unwrap()` on `sub_item.ident()`.
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 5, 2026
…n-ident, r=JonathanBrouwer

Fix ICE on non-ident path in `doc(auto_cfg values)`

Fixes rust-lang#158744

`#[doc(auto_cfg(hide(a, values(::b))))]` could ICE while parsing `values(...)` because the malformed nested meta item did not have a single identifier, but the error path still called `unwrap()` on `sub_item.ident()`.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 5, 2026
…n-ident, r=JonathanBrouwer

Fix ICE on non-ident path in `doc(auto_cfg values)`

Fixes rust-lang#158744

`#[doc(auto_cfg(hide(a, values(::b))))]` could ICE while parsing `values(...)` because the malformed nested meta item did not have a single identifier, but the error path still called `unwrap()` on `sub_item.ident()`.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 5, 2026
…n-ident, r=JonathanBrouwer

Fix ICE on non-ident path in `doc(auto_cfg values)`

Fixes rust-lang#158744

`#[doc(auto_cfg(hide(a, values(::b))))]` could ICE while parsing `values(...)` because the malformed nested meta item did not have a single identifier, but the error path still called `unwrap()` on `sub_item.ident()`.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 5, 2026
…n-ident, r=JonathanBrouwer

Fix ICE on non-ident path in `doc(auto_cfg values)`

Fixes rust-lang#158744

`#[doc(auto_cfg(hide(a, values(::b))))]` could ICE while parsing `values(...)` because the malformed nested meta item did not have a single identifier, but the error path still called `unwrap()` on `sub_item.ident()`.
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 6, 2026
…n-ident, r=JonathanBrouwer

Fix ICE on non-ident path in `doc(auto_cfg values)`

Fixes rust-lang#158744

`#[doc(auto_cfg(hide(a, values(::b))))]` could ICE while parsing `values(...)` because the malformed nested meta item did not have a single identifier, but the error path still called `unwrap()` on `sub_item.ident()`.
rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 20 pull requests

Successful merges:

 - #158377 (add `-Zforce-intrinsic-fallback` flag)
 - #158642 (Clarify some interning details)
 - #158743 (Look for cdb location in the registry first)
 - #158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - #158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - #158785 (hook intrinsic-test into aarch64-gnu)
 - #157734 (Stabilize `local_key_cell_update`)
 - #158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - #158671 (Move tests batch 17)
 - #158730 (Update `FIXME(static_mut_refs)` comments)
 - #158752 (Reorganize `tests/ui/issues` [18/N])
 - #158755 (Use `ThinVec` more in the AST)
 - #158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - #158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - #158771 (library: expand HashSet::extract_if coverage)
 - #158772 (rustc-dev-guide subtree update)
 - #158776 (fix: emit diagnostic for AVR target without target-cpu)
 - #158786 (Add regression test for builtin attr macro values)
 - #158807 (Add regression test for CString::clone_into unwind safety)
 - #158825 (Fix typo)
rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 24 pull requests

Successful merges:

 - #158377 (add `-Zforce-intrinsic-fallback` flag)
 - #158642 (Clarify some interning details)
 - #158694 (Positive test for closures needing expectations)
 - #158743 (Look for cdb location in the registry first)
 - #158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - #158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - #158785 (hook intrinsic-test into aarch64-gnu)
 - #158819 (Put `InhabitedPredicate::NotInModule` earlier in disjunction since it can be a lot faster)
 - #157734 (Stabilize `local_key_cell_update`)
 - #158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - #158310 (Remove unexpected usage of Unambig in non-infer variants)
 - #158671 (Move tests batch 17)
 - #158730 (Update `FIXME(static_mut_refs)` comments)
 - #158752 (Reorganize `tests/ui/issues` [18/N])
 - #158755 (Use `ThinVec` more in the AST)
 - #158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - #158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - #158771 (library: expand HashSet::extract_if coverage)
 - #158772 (rustc-dev-guide subtree update)
 - #158776 (fix: emit diagnostic for AVR target without target-cpu)
 - #158786 (Add regression test for builtin attr macro values)
 - #158810 (Add supplementary information for get_unchecked(mut))
 - #158825 (Fix typo)
 - #158838 (tidy: Use `empty_alternate = true` for triagebot mention glob check)
rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 24 pull requests

Successful merges:

 - #158377 (add `-Zforce-intrinsic-fallback` flag)
 - #158642 (Clarify some interning details)
 - #158694 (Positive test for closures needing expectations)
 - #158743 (Look for cdb location in the registry first)
 - #158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - #158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - #158785 (hook intrinsic-test into aarch64-gnu)
 - #158819 (Put `InhabitedPredicate::NotInModule` earlier in disjunction since it can be a lot faster)
 - #157734 (Stabilize `local_key_cell_update`)
 - #158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - #158310 (Remove unexpected usage of Unambig in non-infer variants)
 - #158671 (Move tests batch 17)
 - #158730 (Update `FIXME(static_mut_refs)` comments)
 - #158752 (Reorganize `tests/ui/issues` [18/N])
 - #158755 (Use `ThinVec` more in the AST)
 - #158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - #158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - #158771 (library: expand HashSet::extract_if coverage)
 - #158772 (rustc-dev-guide subtree update)
 - #158776 (fix: emit diagnostic for AVR target without target-cpu)
 - #158786 (Add regression test for builtin attr macro values)
 - #158810 (Add supplementary information for get_unchecked(mut))
 - #158825 (Fix typo)
 - #158838 (tidy: Use `empty_alternate = true` for triagebot mention glob check)
rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 24 pull requests

Successful merges:

 - #158377 (add `-Zforce-intrinsic-fallback` flag)
 - #158642 (Clarify some interning details)
 - #158694 (Positive test for closures needing expectations)
 - #158743 (Look for cdb location in the registry first)
 - #158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - #158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - #158785 (hook intrinsic-test into aarch64-gnu)
 - #158819 (Put `InhabitedPredicate::NotInModule` earlier in disjunction since it can be a lot faster)
 - #157734 (Stabilize `local_key_cell_update`)
 - #158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - #158310 (Remove unexpected usage of Unambig in non-infer variants)
 - #158671 (Move tests batch 17)
 - #158730 (Update `FIXME(static_mut_refs)` comments)
 - #158752 (Reorganize `tests/ui/issues` [18/N])
 - #158755 (Use `ThinVec` more in the AST)
 - #158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - #158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - #158771 (library: expand HashSet::extract_if coverage)
 - #158772 (rustc-dev-guide subtree update)
 - #158776 (fix: emit diagnostic for AVR target without target-cpu)
 - #158786 (Add regression test for builtin attr macro values)
 - #158810 (Add supplementary information for get_unchecked(mut))
 - #158825 (Fix typo)
 - #158838 (tidy: Use `empty_alternate = true` for triagebot mention glob check)
@rust-bors rust-bors Bot merged commit 2cabed2 into rust-lang:main Jul 6, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 6, 2026
rust-timer added a commit that referenced this pull request Jul 6, 2026
Rollup merge of #158765 - TaKO8Ki:fix-doc-auto-cfg-values-non-ident, r=JonathanBrouwer

Fix ICE on non-ident path in `doc(auto_cfg values)`

Fixes #158744

`#[doc(auto_cfg(hide(a, values(::b))))]` could ICE while parsing `values(...)` because the malformed nested meta item did not have a single identifier, but the error path still called `unwrap()` on `sub_item.ident()`.
pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jul 7, 2026
Rollup of 24 pull requests

Successful merges:

 - rust-lang/rust#158377 (add `-Zforce-intrinsic-fallback` flag)
 - rust-lang/rust#158642 (Clarify some interning details)
 - rust-lang/rust#158694 (Positive test for closures needing expectations)
 - rust-lang/rust#158743 (Look for cdb location in the registry first)
 - rust-lang/rust#158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - rust-lang/rust#158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - rust-lang/rust#158785 (hook intrinsic-test into aarch64-gnu)
 - rust-lang/rust#158819 (Put `InhabitedPredicate::NotInModule` earlier in disjunction since it can be a lot faster)
 - rust-lang/rust#157734 (Stabilize `local_key_cell_update`)
 - rust-lang/rust#158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - rust-lang/rust#158310 (Remove unexpected usage of Unambig in non-infer variants)
 - rust-lang/rust#158671 (Move tests batch 17)
 - rust-lang/rust#158730 (Update `FIXME(static_mut_refs)` comments)
 - rust-lang/rust#158752 (Reorganize `tests/ui/issues` [18/N])
 - rust-lang/rust#158755 (Use `ThinVec` more in the AST)
 - rust-lang/rust#158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - rust-lang/rust#158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - rust-lang/rust#158771 (library: expand HashSet::extract_if coverage)
 - rust-lang/rust#158772 (rustc-dev-guide subtree update)
 - rust-lang/rust#158776 (fix: emit diagnostic for AVR target without target-cpu)
 - rust-lang/rust#158786 (Add regression test for builtin attr macro values)
 - rust-lang/rust#158810 (Add supplementary information for get_unchecked(mut))
 - rust-lang/rust#158825 (Fix typo)
 - rust-lang/rust#158838 (tidy: Use `empty_alternate = true` for triagebot mention glob check)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) 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]: doc_cfg: None in sub_item.ident() (invalid_doc_attribute lint)

4 participants