An open API service indexing awesome lists of open source software.

https://github.com/doumanash/static-assert

Simple Rust macro to assert constant expressions
https://github.com/doumanash/static-assert

compile-time rust static-assertions

Last synced: 4 months ago
JSON representation

Simple Rust macro to assert constant expressions

Awesome Lists containing this project

README

          

# static-assert

![](https://github.com/DoumanAsh/static-assert/workflows/Rust/badge.svg)
[![Crates.io](https://img.shields.io/crates/v/sa.svg)](https://crates.io/crates/sa)
[![Documentation](https://docs.rs/sa/badge.svg)](https://docs.rs/crate/sa/)

Simple `static_assert` macro for compile time assertions.

Uses `const_panic` within `const` variable to produce compile error hence only usable in `const` context

## Requirements

- Rust 1.57