-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile time asserts #2
Comments
Oh, interesting!! Thanks for the pointer. |
Thank you! I implemented static asserts. This also means that might be possible to get forward with getting this to stdlib. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When
const_panic
first stabilized, it didn't seem to be applicable for checking properties of generics, since const items inside functions can't be tied to the generics. However, an associated const on a struct seems to do the trick:Playground
Idea stolen from here.
The text was updated successfully, but these errors were encountered: