Skip to content

Conversation

@folkertdev
Copy link
Contributor

tracking issue: #112788
fixes #139305

Combining return position impl trait (RPIT) with guaranteed tail calls does not currently work, but at least it does not ICE any more.

Using RPIT probably should work, see also #144953.

The snippet in the issue is not valid for a variety of reasons, and based on the assert that got triggered the ICE was just any -> impl Trait at all, so I've made a minimal example using RPIT.

r? @WaffleLapkin

@folkertdev folkertdev added the F-explicit_tail_calls `#![feature(explicit_tail_calls)]` label Nov 11, 2025
@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 Nov 11, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 11, 2025

WaffleLapkin is not on the review rotation at the moment.
They may take a while to respond.

@WaffleLapkin
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 12, 2025

📌 Commit f5f91cc has been approved by WaffleLapkin

It is now in the queue for this repository.

@bors bors 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 Nov 12, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 13, 2025
…eLapkin

add a test for combining RPIT with explicit tail calls

tracking issue: rust-lang#112788
fixes rust-lang#139305

Combining return position impl trait (RPIT) with guaranteed tail calls does not currently work, but at least it does not ICE any more.

Using RPIT probably should work, see also rust-lang#144953.

The snippet in the issue is not valid for a variety of reasons, and based on the assert that got triggered the ICE was just any `-> impl Trait` at all, so I've made a minimal example using RPIT.

r? `@WaffleLapkin`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-explicit_tail_calls `#![feature(explicit_tail_calls)]` 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 when tail calling from a function with RPIT

4 participants