Skip to content

hir_ty_lowering: avoid self type lookup for inherent aliases#158637

Open
Dnreikronos wants to merge 1 commit into
rust-lang:mainfrom
Dnreikronos:hir_ty_lowering/skip_inherent_projection_self_ty
Open

hir_ty_lowering: avoid self type lookup for inherent aliases#158637
Dnreikronos wants to merge 1 commit into
rust-lang:mainfrom
Dnreikronos:hir_ty_lowering/skip_inherent_projection_self_ty

Conversation

@Dnreikronos

@Dnreikronos Dnreikronos commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

fixes #158512

the crash happens while building the unsatisfied-bounds diagnostic for an inherent associated alias. that path was calling self_ty() directly, so an empty args list could panic under the global next solver.

imo the guard belongs in the diagnostic code. it keeps the existing span label when the inherent alias still has a self arg, and only skips that label when the args are already malformed.

@rustbot

rustbot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

HIR ty lowering was modified

cc @fmease

@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 Jul 1, 2026
@rustbot

rustbot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, types
  • compiler, types expanded to 73 candidates
  • Random selection from 16 candidates
@Dnreikronos Dnreikronos marked this pull request as draft July 1, 2026 01:32
@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 Jul 1, 2026
@Dnreikronos Dnreikronos marked this pull request as ready for review July 1, 2026 01:39
@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 Jul 1, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Dnreikronos Dnreikronos marked this pull request as draft July 1, 2026 16:09
@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 Jul 1, 2026
@Dnreikronos Dnreikronos force-pushed the hir_ty_lowering/skip_inherent_projection_self_ty branch from a451636 to f1d0307 Compare July 1, 2026 18:21
@Dnreikronos Dnreikronos marked this pull request as ready for review July 1, 2026 20:30
@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 Jul 1, 2026
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.

4 participants