You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's a compiler bug and I've reported it here. But I think it's wort to post it here as well. Feel free to close this issue if you think that it's indeed a compiler bug and not a typenum issue.
Replacing Div<Self::Size> with Div<U16> or even with explicit Div<Uint<..>> does not fix the error.
Interestingly, having both bounds Div<Self::Size> + Div<U16> makes it compile for me. Though, you need them both in the trait definition as well, so that's not really helpful. But it does point to it being a compiler bug around associated types.
I can also get it to compile by having Size be a type parameter instead of an associated type, so that might be a workable workaround:
I think it's a compiler bug and I've reported it here. But I think it's wort to post it here as well. Feel free to close this issue if you think that it's indeed a compiler bug and not a
typenum
issue.While working on RustCrypto/stream-ciphers#195. I got roughly the following code:
It compiles without issues. The default method impl will not be present in the final code, I just use it to show that the bounds are correct.
But if we are to overwrite the
load
method in theBar
impl by simply copying the default impl:Playground
Compiler will return the following compilation errors:
Replacing
Div<Self::Size>
withDiv<U16>
or even with explicitDiv<Uint<..>>
does not fix the error.The text was updated successfully, but these errors were encountered: