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

Add const_assert_eq! and const_assert_ne! macros #293

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

tarcieri
Copy link
Member

Leverages some idiosyncrasies of the Rust type system to define macros which can be used to make compile-time assertions about const generic parameters, working around the "can't use generic parameters from outer item" error which would occur if one simply used assert_eq/assert_ne

Leverages some idiosyncrasies of the Rust type system to define macros
which can be used to make compile-time assertions about const generic
parameters, working around the "can't use generic parameters from outer
item" error which would occur if one simply used `assert_eq`/`assert_ne`
@tarcieri tarcieri mentioned this pull request Nov 17, 2023
@tarcieri tarcieri merged commit 4838fd9 into master Nov 17, 2023
15 checks passed
@tarcieri tarcieri deleted the const-assert-macros branch November 17, 2023 17:34
@tarcieri tarcieri mentioned this pull request Nov 18, 2023
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

Successfully merging this pull request may close these issues.

1 participant