Skip to content
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

Figure out where repr would be useful #14

Open
2 of 4 tasks
hecatia-elegua opened this issue Apr 28, 2023 · 0 comments
Open
2 of 4 tasks

Figure out where repr would be useful #14

hecatia-elegua opened this issue Apr 28, 2023 · 0 comments

Comments

@hecatia-elegua
Copy link
Owner

hecatia-elegua commented Apr 28, 2023

If we want to allow this to replace num_enum for some tasks, it might be useful.
Besides that I'm not so sure.

  • repr(packed), repr(align(n)) is not useful here, since we only have one field
  • repr(transparent) should just work (would turn into the inner type)
  • repr(uN) works on enums only, we could generate try/from impls for it
  • repr(C) should be investigated more, we currently transmute nested array fields like this: [[T; N]; M] = [T; N*M] and some people say ordering could get messed up that way (though, the nesting usecase is quite rare)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant