Skip to content

test: add regression test for fuzzy_provenance_casts lint ICE#153233

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
yuyahy:ice-issue-137588-regression-test
Mar 2, 2026
Merged

test: add regression test for fuzzy_provenance_casts lint ICE#153233
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
yuyahy:ice-issue-137588-regression-test

Conversation

@yuyahy
Copy link
Contributor

@yuyahy yuyahy commented Feb 28, 2026

This PR adds a regression test for an ICE in draw_code_line that occurred when emitting a fuzzy_provenance_casts lint diagnostic for code with an inner attribute spanning the entire file, causing a panic on an empty file_lines from a dummy span.

The ICE no longer reproduces on the latest main. This PR only adds a regression test to prevent future regressions.
The test is based on the auto-reduced code from the issue.
#137588

@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 Feb 28, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 28, 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 15 candidates

@nnethercote
Copy link
Contributor

Fixes #137588

This doesn't fix #137588, it just adds a regression test. So this description is incorrect.

Does the ICE reported in #137588 still occur? I can't tell. The PR is still open but the test you have added does not include an ICE in the output.

@nnethercote nnethercote 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 Mar 1, 2026
@yuyahy
Copy link
Contributor Author

yuyahy commented Mar 1, 2026

The ICE no longer reproduces on the latest main — the issue was already fixed, and this PR only adds a regression test. The issue had the E-needs-test label.

I've updated the PR description to clarify this. Sorry for the confusion.

@rustbot ready

@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 Mar 1, 2026
@nnethercote
Copy link
Contributor

Thanks for the clarification! Looks good.

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 1, 2026

📌 Commit 6358dcc has been approved by nnethercote

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 Mar 1, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 2, 2026
…-test, r=nnethercote

test: add regression test for fuzzy_provenance_casts lint ICE

This PR adds a regression test for an ICE in `draw_code_line` that occurred when emitting a `fuzzy_provenance_casts` lint diagnostic for code with an inner attribute spanning the entire file, causing a panic on an empty `file_lines` from a dummy span.

The ICE no longer reproduces on the latest main. This PR only adds a regression test to prevent future regressions.
The test is based on the auto-reduced code from the issue.
rust-lang#137588
rust-bors bot pushed a commit that referenced this pull request Mar 2, 2026
Rollup of 6 pull requests

Successful merges:

 - #153015 (core: make atomic primitives type aliases of `Atomic<T>`)
 - #153046 (Couple of cg_ssa refactorings)
 - #153169 (Various small query cleanups)
 - #152304 (stabilize new RangeToInclusive type)
 - #153225 (tests/ui/asm: add annotations for reference rules)
 - #153233 (test: add regression test for fuzzy_provenance_casts lint ICE)
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 2, 2026
…-test, r=nnethercote

test: add regression test for fuzzy_provenance_casts lint ICE

This PR adds a regression test for an ICE in `draw_code_line` that occurred when emitting a `fuzzy_provenance_casts` lint diagnostic for code with an inner attribute spanning the entire file, causing a panic on an empty `file_lines` from a dummy span.

The ICE no longer reproduces on the latest main. This PR only adds a regression test to prevent future regressions.
The test is based on the auto-reduced code from the issue.
rust-lang#137588
rust-bors bot pushed a commit that referenced this pull request Mar 2, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #153169 (Various small query cleanups)
 - #152304 (stabilize new RangeToInclusive type)
 - #153046 (Couple of cg_ssa refactorings)
 - #153090 (elf-raw-dylib: set type for functions)
 - #153225 (tests/ui/asm: add annotations for reference rules)
 - #153233 (test: add regression test for fuzzy_provenance_casts lint ICE)
@rust-bors rust-bors bot merged commit 80a9870 into rust-lang:main Mar 2, 2026
11 checks passed
rust-timer added a commit that referenced this pull request Mar 2, 2026
Rollup merge of #153233 - yuyahy:ice-issue-137588-regression-test, r=nnethercote

test: add regression test for fuzzy_provenance_casts lint ICE

This PR adds a regression test for an ICE in `draw_code_line` that occurred when emitting a `fuzzy_provenance_casts` lint diagnostic for code with an inner attribute spanning the entire file, causing a panic on an empty `file_lines` from a dummy span.

The ICE no longer reproduces on the latest main. This PR only adds a regression test to prevent future regressions.
The test is based on the auto-reduced code from the issue.
#137588
@rustbot rustbot added this to the 1.96.0 milestone Mar 2, 2026
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.

3 participants