[adt_const_params] consider to avoid using specialization when implement traits for Foo<const B: Bar> #130799
Labels
F-adt_const_params
`#![feature(adt_const_params)]`
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Not sure this should be a lacking in RFC or a bug in compiler, sorry if I issued to the wrong place.
The title is a little confusing, here is an exmple for illustating:
As you can see, I listed all the possible trait implementations
Prop
for types ofPropWrapper
(in this case, two possible types), but the compiler still complains:Currently my workaround is to use specialization:
This is unnecessary and the default case will never hit.
Is it reasonable for the compiler to check if all possible implementations are all listed for the case of using
adt_const_params
?I use the nigthly build rustc 1.77.0-nightly (f688dd6 2024-01-04)
The text was updated successfully, but these errors were encountered: