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

Make Alignment types empty #31

Closed
V0ldek opened this issue Jun 2, 2022 · 0 comments · Fixed by #37
Closed

Make Alignment types empty #31

V0ldek opened this issue Jun 2, 2022 · 0 comments · Fixed by #37
Labels
enhancement New feature or request go ahead Reviewed, implementation can start good first issue Good for newcomers help wanted Extra attention is needed

Comments

@V0ldek
Copy link
Owner

V0ldek commented Jun 2, 2022

Is your feature request related to a problem? Please describe.
Types implementing Alignment exist only on the type level and never have any reason to be instantiated. It'd be nice if they were impossible to instantiate.

Describe the solution you'd like
Rust gives us a way of doing this – enums with no variants.

enum TwoTo<const N: usize> { }

The above type can never be instantiated. The definitions of all alignment types in the library should be changed to that.

@V0ldek V0ldek added enhancement New feature or request triage Waiting for owner's input labels Jun 2, 2022
@V0ldek V0ldek self-assigned this Jun 2, 2022
@V0ldek V0ldek added help wanted Extra attention is needed good first issue Good for newcomers go ahead Reviewed, implementation can start and removed triage Waiting for owner's input labels Jun 2, 2022
@V0ldek V0ldek removed their assignment Jul 4, 2022
V0ldek added a commit that referenced this issue Jul 8, 2022
@V0ldek V0ldek closed this as completed in #37 Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go ahead Reviewed, implementation can start good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant