Skip to content

Add const_assert_eq! and const_assert_ne! macros#293

Merged
tarcieri merged 1 commit into
masterfrom
const-assert-macros
Nov 17, 2023
Merged

Add const_assert_eq! and const_assert_ne! macros#293
tarcieri merged 1 commit into
masterfrom
const-assert-macros

Conversation

@tarcieri

Copy link
Copy Markdown
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
@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