Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully handle AnonConst in diagnostic_hir_wf_check() #122370

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

gurry
Copy link
Contributor

@gurry gurry commented Mar 12, 2024

Instead of running the WF check on the AnonConst itself we run it on the ty of the generic param of which the AnonConst is the default value.

Fixes #122199

@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2024

r? @davidtwco

rustbot has assigned @davidtwco.
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

@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 Mar 12, 2024
@gurry gurry force-pushed the 122199-ice-unexpected-node branch from b3c7f11 to d0e4a3b Compare March 12, 2024 08:56
@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 18, 2024

📌 Commit d0e4a3b has been approved by davidtwco

It is now in the queue for this repository.

@bors bors 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 18, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 18, 2024
…r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
@matthiaskrgr
Copy link
Member

I think this needs a rebase

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Mar 18, 2024
…r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
@rust-log-analyzer

This comment has been minimized.

@workingjubilee
Copy link
Member

@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 18, 2024
@workingjubilee
Copy link
Member

workingjubilee commented Mar 18, 2024

PR is incompatible with #122513

It looks like you can "just" replace the code with hir_node_by_def_id (with the associated deoptionalizing refactor).

when it is the default value of a generic param
@gurry gurry force-pushed the 122199-ice-unexpected-node branch from d0e4a3b to 3c70d60 Compare March 19, 2024 03:53
@gurry
Copy link
Contributor Author

gurry commented Mar 19, 2024

Rebase done.

@rustbot label -S-waiting-on-author +S-waiting-on-review

@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 19, 2024
@workingjubilee
Copy link
Member

This looks exactly the same so,

@bors r=davidtwco

@bors
Copy link
Contributor

bors commented Mar 19, 2024

📌 Commit 3c70d60 has been approved by davidtwco

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 19, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 19, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 20, 2024
…davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
@bors
Copy link
Contributor

bors commented Mar 20, 2024

⌛ Testing commit 3c70d60 with merge 67fb0d6...

@bors
Copy link
Contributor

bors commented Mar 20, 2024

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 20, 2024
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@workingjubilee
Copy link
Member

@bors retry

@bors bors 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 22, 2024
@workingjubilee
Copy link
Member

Assuming that was spurious based on only one job hanging.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 22, 2024
…r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 22, 2024
…r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 22, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#121619 (Experimental feature postfix match)
 - rust-lang#122370 (Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`)
 - rust-lang#122537 (interpret/allocation: fix aliasing issue in interpreter and refactor getters a bit)
 - rust-lang#122542 (coverage: Clean up marker statements that aren't needed later)
 - rust-lang#122800 (Add `NonNull::<[T]>::is_empty`.)
 - rust-lang#122820 (Stop using `<DefId as Ord>` in various diagnostic situations)
 - rust-lang#122847 (Suggest `RUST_MIN_STACK` workaround on overflow)
 - rust-lang#122855 (Fix Itanium mangling usizes)
 - rust-lang#122863 (add more ice tests )

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f5ac009 into rust-lang:master Mar 22, 2024
11 of 12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 22, 2024
Rollup merge of rust-lang#122370 - gurry:122199-ice-unexpected-node, r=davidtwco

Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`

Instead of running the WF check on the `AnonConst` itself we run it on the `ty` of the generic param of which the `AnonConst` is the default value.

Fixes rust-lang#122199
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Mar 23, 2024
…, r=workingjubilee

Change an ICE regression test to use the original reproducer

The ICE was fixed in PR rust-lang#122370, but the test used a different reproducer than the one originally reported. This PR changes it to the original one, giving us more confidence that the fix works.

Fixes rust-lang#122199
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 23, 2024
…, r=workingjubilee

Change an ICE regression test to use the original reproducer

The ICE was fixed in PR rust-lang#122370, but the test used a different reproducer than the one originally reported. This PR changes it to the original one, giving us more confidence that the fix works.

Fixes rust-lang#122199
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 23, 2024
…, r=workingjubilee

Change an ICE regression test to use the original reproducer

The ICE was fixed in PR rust-lang#122370, but the test used a different reproducer than the one originally reported. This PR changes it to the original one, giving us more confidence that the fix works.

Fixes rust-lang#122199
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 23, 2024
Rollup merge of rust-lang#122927 - gurry:122199-ice-unexpected-node-2, r=workingjubilee

Change an ICE regression test to use the original reproducer

The ICE was fixed in PR rust-lang#122370, but the test used a different reproducer than the one originally reported. This PR changes it to the original one, giving us more confidence that the fix works.

Fixes rust-lang#122199
RenjiSann pushed a commit to RenjiSann/rust that referenced this pull request Mar 25, 2024
…, r=workingjubilee

Change an ICE regression test to use the original reproducer

The ICE was fixed in PR rust-lang#122370, but the test used a different reproducer than the one originally reported. This PR changes it to the original one, giving us more confidence that the fix works.

Fixes rust-lang#122199
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 4, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#121619 (Experimental feature postfix match)
 - rust-lang#122370 (Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`)
 - rust-lang#122537 (interpret/allocation: fix aliasing issue in interpreter and refactor getters a bit)
 - rust-lang#122542 (coverage: Clean up marker statements that aren't needed later)
 - rust-lang#122800 (Add `NonNull::<[T]>::is_empty`.)
 - rust-lang#122820 (Stop using `<DefId as Ord>` in various diagnostic situations)
 - rust-lang#122847 (Suggest `RUST_MIN_STACK` workaround on overflow)
 - rust-lang#122855 (Fix Itanium mangling usizes)
 - rust-lang#122863 (add more ice tests )

r? `@ghost`
`@rustbot` modify labels: rollup
@gurry gurry deleted the 122199-ice-unexpected-node branch April 30, 2024 10:30
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: Unexpected node AnonConst(AnonConst ..
7 participants