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

Replace static-assertions with const fn expressions #3595

Closed
StackOverflowExcept1on opened this issue Dec 15, 2023 · 0 comments · Fixed by #3596
Closed

Replace static-assertions with const fn expressions #3595

StackOverflowExcept1on opened this issue Dec 15, 2023 · 0 comments · Fixed by #3596
Labels
C2-refactoring Refactoring proposal P4-consider Lowest priority

Comments

@StackOverflowExcept1on
Copy link
Member

File Location(s)

static-assertions crate has not been supported for the last 4 years, but as of Rust 1.57 we can do the same in a constant context: https://internals.rust-lang.org/t/nicer-static-assertions/15986

Proposal

- static_assertions::foo!()
+ const _: () = assert!(FOO == BAR);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C2-refactoring Refactoring proposal P4-consider Lowest priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant