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

fixes #115497 #116169

Closed
wants to merge 2 commits into from
Closed

fixes #115497 #116169

wants to merge 2 commits into from

Conversation

surechen
Copy link
Contributor

fixes #115497
Hi, thank you for reading this. I am not familiar with generics, especially in the case of HRTB mixing with WherePredict , I'm not sure if my method is correct. But I have noticed that this issue has been there for three weeks now and I am very eager to help solve this panic problem.

After multiple attempts, the compiler did pass the tests without any panic, so I submitted this PR for reviewer's advice. The edited code is mainly used to prevent panic in report diagnostic. I have added comments to the code regarding the changes made.

@rustbot
Copy link
Collaborator

rustbot commented Sep 26, 2023

r? @compiler-errors

(rustbot has picked a reviewer for you, use r? to override)

@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 Sep 26, 2023
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=surechen
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_4ac26c78-267e-4367-8a8c-a1c683f4c96b
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=034b48fef3dc22ace43d6573672c011e203d511d
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_4ac26c78-267e-4367-8a8c-a1c683f4c96b
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_4ac26c78-267e-4367-8a8c-a1c683f4c96b
GITHUB_TRIGGERING_ACTOR=surechen
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/116169/merge
GITHUB_WORKFLOW_SHA=034b48fef3dc22ace43d6573672c011e203d511d
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_18_X64=/opt/hostedtoolcache/go/1.18.10/x64
---
    Checking rustc_mir_build v0.0.0 (/checkout/compiler/rustc_mir_build)
error: unused variable: `parent_hir_id`
   --> compiler/rustc_hir_analysis/src/collect/generics_of.rs:100:37
    |
100 | ...                   hir_id: parent_hir_id,
    |                               ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parent_hir_id`
    = note: `-D unused-variables` implied by `-D warnings`

error: unused variable: `ty_info`
   --> compiler/rustc_hir_analysis/src/collect/generics_of.rs:102:37
   --> compiler/rustc_hir_analysis/src/collect/generics_of.rs:102:37
    |
102 | ...                   ty: ty_info,
    |                           ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ty_info`

error: unused variable: `ty`
   --> compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs:983:39
    |
983 |             GenericParamKind::Const { ty, default: Some(default) } => {
    |                                       ^^ help: try ignoring the field: `ty: _`
    Checking rustc_const_eval v0.0.0 (/checkout/compiler/rustc_const_eval)
error: could not compile `rustc_hir_analysis` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:01:25

@compiler-errors
Copy link
Member

Can you explain:

  1. Why does this ICE occur?
  2. What is this PR doing that makes it not occur?
  3. Why is it correct?

@surechen
Copy link
Contributor Author

surechen commented Sep 27, 2023

Can you explain:

  1. Why does this ICE occur?
  2. What is this PR doing that makes it not occur?
  3. Why is it correct?

Thank you for your reply. Previously, I only tested the use cases under test/ui. I just found that there are other test that have not passed. I will close this PR first and submit it after confirming that all the problems is really resolved.

@surechen surechen closed this Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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: unexpected bound var resolution for HirId(DefId(..))
4 participants