Skip to content

delegation: emit error when self type is not specified and accessed#156565

Open
aerooneqq wants to merge 1 commit into
rust-lang:mainfrom
aerooneqq:delegation-self-type-ice
Open

delegation: emit error when self type is not specified and accessed#156565
aerooneqq wants to merge 1 commit into
rust-lang:mainfrom
aerooneqq:delegation-self-type-ice

Conversation

@aerooneqq
Copy link
Copy Markdown
Contributor

@aerooneqq aerooneqq commented May 14, 2026

This PR adds error reporting when we create error self type if it was not specified. In most of the tests there were other errors, so this delayed bug was not triggered, but there are cases like reuse Default::default; (#156388) which does not emit other errors and those delayed bugs are triggered.

Part of #118212. Fixes #156388.

r? @petrochenkov

@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 May 14, 2026
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.

[ICE]: the self type must be specified

3 participants