Skip to content

don't report errors in dispatchability checking - #163201

Open
dianne wants to merge 1 commit into
rust-lang:mainfrom
dianne:normalize-param-env-or-delay-bugs
Open

dianne wants to merge 1 commit into
rust-lang:mainfrom
dianne:normalize-param-env-or-delay-bugs

Conversation

@dianne

@dianne dianne commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

As of #138174, when checking if a trait's methods' receivers are dyn-dispatchable, we call normalize_param_env_or_error, which is prone to reporting duplicate errors and confusing errors involving the placeholder type RustaceansAreAwesome. This makes those all delayed bugs instead. As a consequence, code that only has RustaceansAreAwesome errors (e.g. #161621) will now ICE, which I think is more appropriate.

This gets rid of the extra RustaceansAreAwesome errors introduced by #163200.

@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 Sep 23, 2026
}
}

// FIXME: this is gonna need to be removed ...

@dianne dianne Sep 23, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this FIXME should be duplicated? for now I've just kept it on the function it was originally on

View changes since the review

Comment thread compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs
@dianne
dianne marked this pull request as ready for review September 23, 2026 13:04
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 23, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 23, 2026
@rustbot

rustbot commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

r? @dingxiangfei2009

rustbot has assigned @dingxiangfei2009.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 20 candidates

@dianne
dianne force-pushed the normalize-param-env-or-delay-bugs branch from 4c5bda2 to c2977b5 Compare September 25, 2026 15:59
@rust-bors

This comment has been minimized.

@dianne
dianne force-pushed the normalize-param-env-or-delay-bugs branch from c2977b5 to 2307f01 Compare September 29, 2026 11:22
@rustbot

rustbot commented Sep 29, 2026

Copy link
Copy Markdown
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.

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.

4 participants