Skip to content

Avoid using probe self_ty for delegation arguments#159216

Merged
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
TaKO8Ki:delegation-probe-self-ty
Jul 13, 2026
Merged

Avoid using probe self_ty for delegation arguments#159216
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
TaKO8Ki:delegation-probe-self-ty

Conversation

@TaKO8Ki

@TaKO8Ki TaKO8Ki commented Jul 13, 2026

Copy link
Copy Markdown
Member

Fixes #159128

The old code temporarily wrote pick.self_ty into the first argument's node type before normal argument checking.

That self_ty can contain inference variables created inside the method-probe transaction, so resolving it later in the real function checking context could cause the ICE in ena.

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

rustbot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

rustbot has assigned @JohnTitor.
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 75 candidates
  • Random selection from 17 candidates

@TaKO8Ki TaKO8Ki force-pushed the delegation-probe-self-ty branch from ba64f3a to 5d41744 Compare July 13, 2026 10:37
@rustbot

rustbot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@petrochenkov petrochenkov self-assigned this Jul 13, 2026
@petrochenkov petrochenkov added the F-fn_delegation `#![feature(fn_delegation)]` label Jul 13, 2026
// Regression test for https://github.com/rust-lang/rust/issues/159128.

#![feature(fn_delegation)]
#![allow(incomplete_features)]

@petrochenkov petrochenkov Jul 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This attribute is unnecessary (added by default to all ui tests now).

View changes since the review

@petrochenkov

Copy link
Copy Markdown
Contributor

r=me after the test cleanup.
@rustbot author

@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 13, 2026
@TaKO8Ki

TaKO8Ki commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

@bors r=petrochenkov

@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a991824 has been approved by petrochenkov

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 13, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 13, 2026
…r=petrochenkov

Avoid using probe self_ty for delegation arguments

Fixes rust-lang#159128

The old code temporarily wrote `pick.self_ty` into the first argument's node type before normal argument checking.

That `self_ty` can contain inference variables created inside the method-probe transaction, so resolving it later in the real function checking context could cause the ICE in `ena`.
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #159039 (resolve: fix effective visibilities for items in ambiguous glob sets)
 - #157706 (Deny `todo!()` in tidy)
 - #156712 (Pointer authentication config and user facing options)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158632 (First steps of late-bound turbofishing (place FnDef behind a dummy binder))
 - #159002 (Small refactorings in `need_type_info` module)
 - #159202 (Bump rustc-demangle to 0.1.28)
 - #159216 (Avoid using probe self_ty for delegation arguments)
 - #159222 (semicolon_in_expressions_from_macros: Lint on non-local macros too)
 - #156609 (Consider structurally impossible Sized predicates in MIR)
 - #158854 (Add `#[rustc_test_entrypoint_marker]`)
 - #158998 (Some minor ast validation and visiting cleanups)
 - #159123 (doc: clarify attr parser APIs)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 13, 2026
…r=petrochenkov

Avoid using probe self_ty for delegation arguments

Fixes rust-lang#159128

The old code temporarily wrote `pick.self_ty` into the first argument's node type before normal argument checking.

That `self_ty` can contain inference variables created inside the method-probe transaction, so resolving it later in the real function checking context could cause the ICE in `ena`.
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #159039 (resolve: fix effective visibilities for items in ambiguous glob sets)
 - #157706 (Deny `todo!()` in tidy)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158632 (First steps of late-bound turbofishing (place FnDef behind a dummy binder))
 - #158846 (Fix unused variable warnings for diverging expressions)
 - #159002 (Small refactorings in `need_type_info` module)
 - #159202 (Bump rustc-demangle to 0.1.28)
 - #159216 (Avoid using probe self_ty for delegation arguments)
 - #159222 (semicolon_in_expressions_from_macros: Lint on non-local macros too)
 - #156609 (Consider structurally impossible Sized predicates in MIR)
 - #157993 (Expose more info about ADTs and functions in rustc_public)
 - #158854 (Add `#[rustc_test_entrypoint_marker]`)
 - #158998 (Some minor ast validation and visiting cleanups)
 - #159123 (doc: clarify attr parser APIs)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 13, 2026
…r=petrochenkov

Avoid using probe self_ty for delegation arguments

Fixes rust-lang#159128

The old code temporarily wrote `pick.self_ty` into the first argument's node type before normal argument checking.

That `self_ty` can contain inference variables created inside the method-probe transaction, so resolving it later in the real function checking context could cause the ICE in `ena`.
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #159039 (resolve: fix effective visibilities for items in ambiguous glob sets)
 - #157706 (Deny `todo!()` in tidy)
 - #156047 (Fix trait method resolution on an adjusted never type)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158632 (First steps of late-bound turbofishing (place FnDef behind a dummy binder))
 - #158846 (Fix unused variable warnings for diverging expressions)
 - #159002 (Small refactorings in `need_type_info` module)
 - #159202 (Bump rustc-demangle to 0.1.28)
 - #159216 (Avoid using probe self_ty for delegation arguments)
 - #156609 (Consider structurally impossible Sized predicates in MIR)
 - #157993 (Expose more info about ADTs and functions in rustc_public)
 - #158804 (Clarify `as_uninit_mut` may point to uninitialized memory)
 - #158854 (Add `#[rustc_test_entrypoint_marker]`)
 - #158998 (Some minor ast validation and visiting cleanups)
 - #159123 (doc: clarify attr parser APIs)
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #157706 (Deny `todo!()` in tidy)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158632 (First steps of late-bound turbofishing (place FnDef behind a dummy binder))
 - #158846 (Fix unused variable warnings for diverging expressions)
 - #159002 (Small refactorings in `need_type_info` module)
 - #159202 (Bump rustc-demangle to 0.1.28)
 - #159216 (Avoid using probe self_ty for delegation arguments)
 - #156609 (Consider structurally impossible Sized predicates in MIR)
 - #157993 (Expose more info about ADTs and functions in rustc_public)
 - #158804 (Clarify `as_uninit_mut` may point to uninitialized memory)
 - #158854 (Add `#[rustc_test_entrypoint_marker]`)
 - #158998 (Some minor ast validation and visiting cleanups)
 - #159123 (doc: clarify attr parser APIs)
@rust-bors rust-bors Bot merged commit 256bcb8 into rust-lang:main Jul 13, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 13, 2026
rust-timer added a commit that referenced this pull request Jul 13, 2026
Rollup merge of #159216 - TaKO8Ki:delegation-probe-self-ty, r=petrochenkov

Avoid using probe self_ty for delegation arguments

Fixes #159128

The old code temporarily wrote `pick.self_ty` into the first argument's node type before normal argument checking.

That `self_ty` can contain inference variables created inside the method-probe transaction, so resolving it later in the real function checking context could cause the ICE in `ena`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-fn_delegation `#![feature(fn_delegation)]` 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]: delegation: snapshot_vec: index out of bounds with unused type param

4 participants