Avoid using probe self_ty for delegation arguments#159216
Merged
Merged
Conversation
Collaborator
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
ba64f3a to
5d41744
Compare
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. |
| // Regression test for https://github.com/rust-lang/rust/issues/159128. | ||
|
|
||
| #![feature(fn_delegation)] | ||
| #![allow(incomplete_features)] |
Contributor
There was a problem hiding this comment.
This attribute is unnecessary (added by default to all ui tests now).
Contributor
|
r=me after the test cleanup. |
Member
Author
|
@bors r=petrochenkov |
Contributor
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-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`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #159128
The old code temporarily wrote
pick.self_tyinto the first argument's node type before normal argument checking.That
self_tycan contain inference variables created inside the method-probe transaction, so resolving it later in the real function checking context could cause the ICE inena.