Change hashing/comparison of LintExpectationId (fix ICE)#154906
Change hashing/comparison of LintExpectationId (fix ICE)#154906Bryntet wants to merge 3 commits intorust-lang:mainfrom
LintExpectationId (fix ICE)#154906Conversation
|
Some changes occurred in compiler/rustc_hir/src/attrs cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_attr_parsing |
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
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 |
|
Reminder, once the PR becomes ready for a review, use |
7134212 to
b4897ea
Compare
|
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. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
b4897ea to
31d95d9
Compare
|
@rustbot ready added regression test and tested that it indeed does fail on main |
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Change hashing/comparison of `LintExpectationId` (fix ICE)
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (4720e09): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 5.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 487.739s -> 488.081s (0.07%) |
|
Any idea why removing AttrId is necessary? |
I'm a bit confused why the old code never had this problem, because |
31d95d9 to
b37e04b
Compare
Previously, So therefore I instead decided to store the AttrId inside But this as we now see led to this bug |
|
here's the old code that got |
b37e04b to
eb41bf3
Compare
eb41bf3 to
e41b8f2
Compare
|
Also, since this no longer requires Edit: if we were to do this, that should probably be it's own, separate PR though. |
|
I discovered this issue while trying to figure out if using |
|
I agree this should not use spans. Spans are for diagnostics and debuginfo. Good path compilation should not use them. |
#155038 fixes #155008 and said fix works on this branch as well, it wasn't related to the span usage. I understand why we might not want to use spans, and am open to any suggestions of what to do instead, since AttrId's won't work because: we might be able to avoid the ICE by making the query |
|
☔ The latest upstream changes (presumably #155056) made this pull request unmergeable. Please resolve the merge conflicts. |
|
This PR should be integrated in the new attribute lint port attempt, rather than being a separate PR |
View all comments
this fixes #154878 by removing
attr_idfromLintExpectationIdand instead usingtarget_span+attr_index+lint_indexin combination to refer to a unique lint expectation