Skip to content

don't treat inherited opaques as defining - #163950

Open
amirHdev wants to merge 1 commit into
rust-lang:mainfrom
amirHdev:delegation-inherited-opaques
Open

amirHdev wants to merge 1 commit into
rust-lang:mainfrom
amirHdev:delegation-inherited-opaques

Conversation

@amirHdev

@amirHdev amirHdev commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

fixes rust-lang/trait-system-refactor-initiative#304

function delegation can inherit opaque return types from the callee
Avoid treating those inherited RPIT and async opaques as if they were defined by the delegation item itself

r? lcnr

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 7, 2026
@rust-bors

This comment has been minimized.

Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
@amirHdev
amirHdev force-pushed the delegation-inherited-opaques branch from aeb3ddf to 4acc47b Compare October 8, 2026 12:18
@amirHdev
amirHdev marked this pull request as ready for review October 8, 2026 12:19
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 8, 2026
// Their types may also appear in signatures inherited from other items.
if parent != self.item {
return;
}

@lcnr lcnr Oct 8, 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 doesn't feel ideal. Could we instead explicitly change delegation to never define any opaque types? 🤔

also cc @oli-obk on how to best do stuff here

View changes since the review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature(fn_delegation) does not handle opaque types correctly

3 participants