Skip to content

handle higher-ranked preds in imperfect derives diagnostic - #164383

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
sjwang05:issue-164376
Oct 21, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
sjwang05:issue-164376

Conversation

@sjwang05

@sjwang05 sjwang05 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

trait_args can contain escaping bound vars if we need to prove something like for<'a> &'a T: Clone, and since we call skip_binder() on parent_trait_pred to build the new trait ref's args, we need to rebind any bound vars we may encounter in the args.

fixes #164376

@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 Oct 15, 2026
@rustbot

rustbot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
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 77 candidates
  • Random selection from 18 candidates

@Kivooeo

Kivooeo commented Oct 15, 2026

Copy link
Copy Markdown
Member

r? types

@rustbot rustbot added the T-types Relevant to the types team, which will review and decide on the PR/issue. label Oct 15, 2026
@rustbot rustbot assigned lcnr and unassigned TaKO8Ki Oct 15, 2026
@theemathas

Copy link
Copy Markdown
Contributor

cc @raushan728 and @mejrs (author + reviewer of #159363), in case you have any thoughts.

@estebank

Copy link
Copy Markdown
Contributor

The change looks reasonable and it needs to be backported to beta.

@bors r+

@rust-bors

rust-bors Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c4da87c has been approved by estebank

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

Reason for tree closure: github outage

@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 Oct 21, 2026
@theemathas theemathas added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 21, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 21, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #164383 (handle higher-ranked preds in imperfect derives diagnostic)
 - #164620 (Wrap expected_ty for cfi-{diag,recover} in with_no_trimmed_paths)
 - #164684 (Remove redundant `PartialOrd` chaining methods)
 - #158076 (Offload safe mutable args with `Region` and `PartitioningStrategy`)
 - #164680 (Add regression test for async fn declared with #[eii])
 - #164696 (Add `#[default]` for `newtype_index!`)
@Kivooeo Kivooeo assigned estebank and unassigned lcnr Oct 21, 2026
@rust-bors
rust-bors Bot merged commit db62934 into rust-lang:main Oct 21, 2026
14 checks passed
rust-bors Bot pushed a commit that referenced this pull request Oct 21, 2026
Rollup merge of #164383 - sjwang05:issue-164376, r=estebank

handle higher-ranked preds in imperfect derives diagnostic

`trait_args` can contain escaping bound vars if we need to prove something like `for<'a> &'a T: Clone`, and since we call `skip_binder()` on `parent_trait_pred` to build the new trait ref's args, we need to rebind any bound vars we may encounter in the args.

fixes #164376
@rustbot rustbot added this to the 1.101.0 milestone Oct 21, 2026
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Oct 25, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#164383 (handle higher-ranked preds in imperfect derives diagnostic)
 - rust-lang/rust#164620 (Wrap expected_ty for cfi-{diag,recover} in with_no_trimmed_paths)
 - rust-lang/rust#164684 (Remove redundant `PartialOrd` chaining methods)
 - rust-lang/rust#158076 (Offload safe mutable args with `Region` and `PartitioningStrategy`)
 - rust-lang/rust#164680 (Add regression test for async fn declared with #[eii])
 - rust-lang/rust#164696 (Add `#[default]` for `newtype_index!`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-nominated Nominated for backporting to the compiler in the beta channel. 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. T-types Relevant to the types team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.100 beta regression: ICE with "has escaping bound vars, so it cannot be wrapped in a dummy binder"

7 participants