Skip to content

fix: point at method call chain when a return-position impl Trait assoc type diverges#159365

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Albab-Hasan:point-at-chain-in-return-position
Jul 17, 2026
Merged

fix: point at method call chain when a return-position impl Trait assoc type diverges#159365
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Albab-Hasan:point-at-chain-in-return-position

Conversation

@Albab-Hasan

Copy link
Copy Markdown
Contributor

a mismatch on -> impl Iterator<Item = Ty> only pointed at the signature, not at the call in the returned chain where Item actually changed. the failed predicate is useless for this, its already rewritten through the impls it was derived from, so the expected assoc types are read from the opaques own bounds and probed against the returned expression. on divergence the existing point_at_chain walk kicks in, same as it does for function arguments. handles the chain at the tail expression, behind a let binding and derived through adapters like flatten. unrelated failures stay silent since the probe just doesnt resolve there.

fixes #106993

r? @estebank

…type diverges

a mismatch on `-> impl Iterator<Item = Ty>` only pointed at the signature, not at the call in the returned chain where `Item` actually changed. the failed predicate is useless for this, its already rewritten through the impls it was derived from, so the expected assoc types are read from the opaques own bounds and probed against the returned expression. on divergence the existing `point_at_chain` walk kicks in, same as it does for function arguments. handles the chain at the tail expression, behind a `let` binding, and derived through adapters like `flatten`. unrelated failures stay silent since the probe just doesnt resolve there.

fixes rust-lang#106993
@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 16, 2026
@Albab-Hasan Albab-Hasan changed the title point at method call chain when a return-position impl Trait assoc type diverges fix: point at method call chain when a return-position impl Trait assoc type diverges Jul 16, 2026
@estebank

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9c81f66 has been approved by estebank

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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 16, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 17, 2026
…rn-position, r=estebank

fix: point at method call chain when a return-position `impl Trait` assoc type diverges

a mismatch on `-> impl Iterator<Item = Ty>` only pointed at the signature, not at the call in the returned chain where `Item` actually changed. the failed predicate is useless for this, its already rewritten through the impls it was derived from, so the expected assoc types are read from the opaques own bounds and probed against the returned expression. on divergence the existing `point_at_chain` walk kicks in, same as it does for function arguments. handles the chain at the tail expression, behind a `let` binding and derived through adapters like `flatten`. unrelated failures stay silent since the probe just doesnt resolve there.

fixes rust-lang#106993

r? @estebank
rust-bors Bot pushed a commit that referenced this pull request Jul 17, 2026
Rollup of 10 pull requests

Successful merges:

 - #156977 (interpret: properly check for inhabitedness of nested references)
 - #159365 (fix: point at method call chain when a return-position `impl Trait` assoc type diverges)
 - #159402 (Clarify safety requirements for SIMD shl/shr and masked load/store)
 - #159410 (rustdoc: remove old `--emit` types)
 - #159302 (Implement `Debug` helpers via `Cell`)
 - #159386 (add a fallback for `fmuladdf*`)
 - #159391 (Update tests for LLVM 23)
 - #159400 (Update books)
 - #159401 (Gate `tests/debuginfo/function-call.rs` on min GDB 15.1)
 - #159404 ([aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC)
@rust-bors

rust-bors Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

rust-bors Bot pushed a commit that referenced this pull request Jul 17, 2026
…, r=estebank

fix: point at method call chain when a return-position `impl Trait` assoc type diverges

a mismatch on `-> impl Iterator<Item = Ty>` only pointed at the signature, not at the call in the returned chain where `Item` actually changed. the failed predicate is useless for this, its already rewritten through the impls it was derived from, so the expected assoc types are read from the opaques own bounds and probed against the returned expression. on divergence the existing `point_at_chain` walk kicks in, same as it does for function arguments. handles the chain at the tail expression, behind a `let` binding and derived through adapters like `flatten`. unrelated failures stay silent since the probe just doesnt resolve there.

fixes #106993

r? @estebank
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 17, 2026
…rn-position, r=estebank

fix: point at method call chain when a return-position `impl Trait` assoc type diverges

a mismatch on `-> impl Iterator<Item = Ty>` only pointed at the signature, not at the call in the returned chain where `Item` actually changed. the failed predicate is useless for this, its already rewritten through the impls it was derived from, so the expected assoc types are read from the opaques own bounds and probed against the returned expression. on divergence the existing `point_at_chain` walk kicks in, same as it does for function arguments. handles the chain at the tail expression, behind a `let` binding and derived through adapters like `flatten`. unrelated failures stay silent since the probe just doesnt resolve there.

fixes rust-lang#106993

r? @estebank
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors yield
Scheduling

@rust-bors

rust-bors Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Auto build was cancelled. Cancelled workflows:

The next pull request likely to be tested is #159384.

rust-bors Bot pushed a commit that referenced this pull request Jul 17, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #159365 (fix: point at method call chain when a return-position `impl Trait` assoc type diverges)
 - #159402 (Clarify safety requirements for SIMD shl/shr and masked load/store)
 - #159410 (rustdoc: remove old `--emit` types)
 - #159302 (Implement `Debug` helpers via `Cell`)
 - #159386 (add a fallback for `fmuladdf*`)
 - #159391 (Update tests for LLVM 23)
 - #159400 (Update books)
 - #159401 (Gate `tests/debuginfo/function-call.rs` on min GDB 15.1)
 - #159404 ([aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC)
 - #159405 (Manually implement Clone for GrowableBitSet)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 17, 2026
…rn-position, r=estebank

fix: point at method call chain when a return-position `impl Trait` assoc type diverges

a mismatch on `-> impl Iterator<Item = Ty>` only pointed at the signature, not at the call in the returned chain where `Item` actually changed. the failed predicate is useless for this, its already rewritten through the impls it was derived from, so the expected assoc types are read from the opaques own bounds and probed against the returned expression. on divergence the existing `point_at_chain` walk kicks in, same as it does for function arguments. handles the chain at the tail expression, behind a `let` binding and derived through adapters like `flatten`. unrelated failures stay silent since the probe just doesnt resolve there.

fixes rust-lang#106993

r? @estebank
rust-bors Bot pushed a commit that referenced this pull request Jul 17, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #150732 (Convert `-Ctarget-cpu` into a target-modifier for AVR, AMDGCN and NVPTX )
 - #159301 (Update Enzyme to handle LLVM23)
 - #159365 (fix: point at method call chain when a return-position `impl Trait` assoc type diverges)
 - #159402 (Clarify safety requirements for SIMD shl/shr and masked load/store)
 - #159410 (rustdoc: remove old `--emit` types)
 - #158398 (Comment about empty run_passes, fixup of #158040)
 - #158843 (Fix ICE in `write_interface` when the interface file can't be written)
 - #159302 (Implement `Debug` helpers via `Cell`)
 - #159332 (Honor field-level lint attributes in non_snake_case)
 - #159386 (add a fallback for `fmuladdf*`)
 - #159391 (Update tests for LLVM 23)
 - #159400 (Update books)
 - #159401 (Gate `tests/debuginfo/function-call.rs` on min GDB 15.1)
 - #159404 ([aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC)
 - #159405 (Manually implement Clone for GrowableBitSet)
 - #159415 (rustdoc: rename the doc parts metadata params)
rust-bors Bot pushed a commit that referenced this pull request Jul 17, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #159301 (Update Enzyme to handle LLVM23)
 - #159365 (fix: point at method call chain when a return-position `impl Trait` assoc type diverges)
 - #159402 (Clarify safety requirements for SIMD shl/shr and masked load/store)
 - #159408 (rustc_data_structures: Expand documentation for rustc jobserver APIs)
 - #159410 (rustdoc: remove old `--emit` types)
 - #158398 (Comment about empty run_passes, fixup of #158040)
 - #158843 (Fix ICE in `write_interface` when the interface file can't be written)
 - #159302 (Implement `Debug` helpers via `Cell`)
 - #159332 (Honor field-level lint attributes in non_snake_case)
 - #159340 (Rename `errors.rs` file to `diagnostics.rs` (14/N))
 - #159386 (add a fallback for `fmuladdf*`)
 - #159391 (Update tests for LLVM 23)
 - #159400 (Update books)
 - #159401 (Gate `tests/debuginfo/function-call.rs` on min GDB 15.1)
 - #159404 ([aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC)
 - #159405 (Manually implement Clone for GrowableBitSet)
 - #159415 (rustdoc: rename the doc parts metadata params)
@rust-bors
rust-bors Bot merged commit 666a5ea into rust-lang:main Jul 17, 2026
13 of 14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 17, 2026
rust-timer added a commit that referenced this pull request Jul 17, 2026
Rollup merge of #159365 - Albab-Hasan:point-at-chain-in-return-position, r=estebank

fix: point at method call chain when a return-position `impl Trait` assoc type diverges

a mismatch on `-> impl Iterator<Item = Ty>` only pointed at the signature, not at the call in the returned chain where `Item` actually changed. the failed predicate is useless for this, its already rewritten through the impls it was derived from, so the expected assoc types are read from the opaques own bounds and probed against the returned expression. on divergence the existing `point_at_chain` walk kicks in, same as it does for function arguments. handles the chain at the tail expression, behind a `let` binding and derived through adapters like `flatten`. unrelated failures stay silent since the probe just doesnt resolve there.

fixes #106993

r? @estebank
Kobzol pushed a commit to Kobzol/rustc_codegen_cranelift that referenced this pull request Jul 23, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - rust-lang/rust#159301 (Update Enzyme to handle LLVM23)
 - rust-lang/rust#159365 (fix: point at method call chain when a return-position `impl Trait` assoc type diverges)
 - rust-lang/rust#159402 (Clarify safety requirements for SIMD shl/shr and masked load/store)
 - rust-lang/rust#159408 (rustc_data_structures: Expand documentation for rustc jobserver APIs)
 - rust-lang/rust#159410 (rustdoc: remove old `--emit` types)
 - rust-lang/rust#158398 (Comment about empty run_passes, fixup of rust-lang/rust#158040)
 - rust-lang/rust#158843 (Fix ICE in `write_interface` when the interface file can't be written)
 - rust-lang/rust#159302 (Implement `Debug` helpers via `Cell`)
 - rust-lang/rust#159332 (Honor field-level lint attributes in non_snake_case)
 - rust-lang/rust#159340 (Rename `errors.rs` file to `diagnostics.rs` (14/N))
 - rust-lang/rust#159386 (add a fallback for `fmuladdf*`)
 - rust-lang/rust#159391 (Update tests for LLVM 23)
 - rust-lang/rust#159400 (Update books)
 - rust-lang/rust#159401 (Gate `tests/debuginfo/function-call.rs` on min GDB 15.1)
 - rust-lang/rust#159404 ([aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC)
 - rust-lang/rust#159405 (Manually implement Clone for GrowableBitSet)
 - rust-lang/rust#159415 (rustdoc: rename the doc parts metadata params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

On -> impl Iterator<Item = Ty> point at method chains in returned expression where Item might have diverged

4 participants