Why does U256::try_from(0u128) does not implement TryFrom<u128, Error=Infallible>? #523
-
|
As the question states, I'm curious as to why it is the case that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
This is blocked by specialization. Because rust does not yet support specialization of trait impls, we have to implement generically, which means the error type must be the same for all values of You can read about some related rough edges in the It would be also great to do things like the following, but unfortunately also blocked by language features |
Beta Was this translation helpful? Give feedback.
This is blocked by specialization. Because rust does not yet support specialization of trait impls, we have to implement generically, which means the error type must be the same for all values of
BITSandLIMBS. So even in the case where we can guarantee anInfallibleconversion, the error unfortunately type cannot beInfallibleYou can read about some related rough edges in the
TryFromimpls hereIt would be also great to do things like the following, but unfortunately also blocked by language features