Skip to content

Fix - const parameters rejected when identical - #162908

Open
Jamesbarford wants to merge 1 commit into
rust-lang:mainfrom
Jamesbarford:fix/const-generic-bug
Open

Jamesbarford wants to merge 1 commit into
rust-lang:mainfrom
Jamesbarford:fix/const-generic-bug

Conversation

@Jamesbarford

@Jamesbarford Jamesbarford commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

This keeps the cheap check of;

if tcx.type_of(param_impl.def_id) != tcx.type_of(param_trait.def_id) =>

But then falls back to a more heavyweight comparison if that check fails. Used the example in the issue as the test case.

r? @khyperia

Fixes #162897

@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 Sep 17, 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.

E0053: const parameters under generic_const_parameter_types rejected when identical

3 participants