static_assert -> const_assert

This commit is contained in:
Lokathor 2018-12-15 20:45:25 -07:00
parent 09c16ef1b0
commit e9a8b80a4e
2 changed files with 4 additions and 3 deletions

View file

@ -1,10 +1,11 @@
# Static Asserts # Constant Assertions
Have you ever wanted to assert things _even before runtime_? We all have, of Have you ever wanted to assert things _even before runtime_? We all have, of
course. Particularly when the runtime machine is a poor little GBA, we'd like to course. Particularly when the runtime machine is a poor little GBA, we'd like to
have the machine doing the compile handle as much checking as possible. have the machine doing the compile handle as much checking as possible.
Enter [static assertions](https://docs.rs/static_assertions/). Enter the [static assertions](https://docs.rs/static_assertions/) crate, which
provides a way to let you assert on a `const` expression.
This is an amazing crate that you should definitely use when you can. This is an amazing crate that you should definitely use when you can.

View file

@ -12,7 +12,7 @@
* [Fixed Only](01-quirks/02-fixed_only.md) * [Fixed Only](01-quirks/02-fixed_only.md)
* [Volatile Destination](01-quirks/03-volatile_destination.md) * [Volatile Destination](01-quirks/03-volatile_destination.md)
* [Newtype](01-quirks/04-newtype.md) * [Newtype](01-quirks/04-newtype.md)
* [Static Asserts](01-quirks/05-static_asserts.md) * [Static Asserts](01-quirks/05-const_asserts.md)
* [Concepts](02-concepts/00-index.md) * [Concepts](02-concepts/00-index.md)
* [CPU](02-concepts/01-cpu.md) * [CPU](02-concepts/01-cpu.md)
* [BIOS](02-concepts/02-bios.md) * [BIOS](02-concepts/02-bios.md)