Skip to content

Conversation

@mu001999
Copy link
Contributor

@mu001999 mu001999 commented Jan 18, 2026

Fixes #151250

attr::contains_name uses AttributeExt::name() to filter, but for hir::Attribute::Parsed, this method will return None, and then attr::contains_name will return false here. So that the previous logic cannot work as expected.

r? @BoxyUwU

@rustbot rustbot added 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. labels Jan 18, 2026
@BoxyUwU
Copy link
Member

BoxyUwU commented Jan 18, 2026

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 18, 2026

📌 Commit db9f9e6 has been approved by BoxyUwU

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 Jan 18, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 18, 2026
Use `find_attr` instead of `attr::contains_name` in `lower_const_item_rhs`

Fixes rust-lang#151250

`attr::contains_name` uses `AttributeExt::name()` to filter, but for `hir::Attribute::Parsed`, this method will return `None`, and then `attr::contains_name` will return `false` here. So that the previous logic cannot work as expected.

r? @BoxyUwU
rust-bors bot pushed a commit that referenced this pull request Jan 18, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #150767 (Allow invoking all help options at once)
 - #150886 (Added mGCA related tests)
 - #151245 (Explicitly list crate level attrs)
 - #151268 (Fix ICE on inconsistent import resolution with macro-attributed extern crate)
 - #151275 (Normalize type_const items even with feature `generic_const_exprs`)
 - #151288 (Use `find_attr` instead of `attr::contains_name` in `lower_const_item_rhs`)
 - #151321 (Port #![no_main] to the attribute parser.)

r? @ghost
@rust-bors rust-bors bot merged commit 4df80b1 into rust-lang:main Jan 18, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 18, 2026
rust-timer added a commit that referenced this pull request Jan 18, 2026
Rollup merge of #151288 - fix/151250, r=BoxyUwU

Use `find_attr` instead of `attr::contains_name` in `lower_const_item_rhs`

Fixes #151250

`attr::contains_name` uses `AttributeExt::name()` to filter, but for `hir::Attribute::Parsed`, this method will return `None`, and then `attr::contains_name` will return `false` here. So that the previous logic cannot work as expected.

r? @BoxyUwU
@mu001999 mu001999 deleted the fix/151250 branch January 19, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: thir_body queried for type_const

3 participants