const generic: unclear why "type annotations needed" error #72787
Labels
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-const_generics
`#![feature(const_generics)]`
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I'm experimenting with replacing typenum with const generics, and replacing constraints involving constant generics being compared to other constant generics. I have gotten a little further recently, probably because of the recent merging of lazy normalization PRs. I have just stumbled upon a new issue.
This gives the error
In this specific case, replacing
IsLessOrEqual<{ 8 - I }, { 8 - J }>: True
with the commented-outCondition<{ 8 - I <= 8 - J }>: True
makes the compilation work. However that is still not very robust: changing all threeIsLessOrEqual
constraints to the equivalentCondition
constraints would again lead to compilation failure.The text was updated successfully, but these errors were encountered: