Skip to content

Change hashing/comparison of LintExpectationId (fix ICE)#154906

Open
Bryntet wants to merge 3 commits intorust-lang:mainfrom
Bryntet:fix-expectation-id-hashing
Open

Change hashing/comparison of LintExpectationId (fix ICE)#154906
Bryntet wants to merge 3 commits intorust-lang:mainfrom
Bryntet:fix-expectation-id-hashing

Conversation

@Bryntet
Copy link
Copy Markdown
Contributor

@Bryntet Bryntet commented Apr 6, 2026

this fixes #154878 by removing attr_id from LintExpectationId and instead using target_span + attr_index + lint_index in combination to refer to a unique lint expectation

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 6, 2026

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann, @JonathanBrouwer

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. labels Apr 6, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 6, 2026

r? @nnethercote

rustbot has assigned @nnethercote.
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: compiler
  • compiler expanded to 69 candidates
  • Random selection from 10 candidates

@Bryntet
Copy link
Copy Markdown
Contributor Author

Bryntet commented Apr 6, 2026

I couldn't figure out how to make a regression test for this due to it needing the incremental cache, if you know how to I'd love to add it

Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer left a comment

Choose a reason for hiding this comment

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

Adding a regression test should be possible as an incremental test

View changes since this review

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 6, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 6, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@Bryntet Bryntet force-pushed the fix-expectation-id-hashing branch from 7134212 to b4897ea Compare April 6, 2026 19:18
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 6, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Bryntet

This comment was marked as off-topic.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 6, 2026
@Bryntet

This comment was marked as off-topic.

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 6, 2026
@Bryntet Bryntet force-pushed the fix-expectation-id-hashing branch from b4897ea to 31d95d9 Compare April 6, 2026 19:33
@Bryntet
Copy link
Copy Markdown
Contributor Author

Bryntet commented Apr 6, 2026

@rustbot ready

added regression test and tested that it indeed does fail on main

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 6, 2026
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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: cannot decode AttrId with CacheDecoder

4 participants