mirror of
https://github.com/italicsjenga/gba.git
synced 2024-12-24 11:11:31 +11:00
issue tracker links
This commit is contained in:
parent
d78e6033c4
commit
3d2dbbf214
|
@ -42,8 +42,9 @@ warning to a hard error:
|
||||||
const ASSERT: usize = 0 - 1;
|
const ASSERT: usize = 0 - 1;
|
||||||
```
|
```
|
||||||
|
|
||||||
And to make our construction reusable we can enable the `underscore_const_names`
|
And to make our construction reusable we can enable the
|
||||||
feature in our program or library and give each such const an underscore for a
|
[underscore_const_names](https://github.com/rust-lang/rust/issues/54912) feature
|
||||||
|
in our program (or library) and then give each such const an underscore for a
|
||||||
name.
|
name.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
@ -76,7 +77,10 @@ Technically, written like this, the expression can be anything with a
|
||||||
It doesn't really hurt if you want to `const_assert!` a number I guess. I mean,
|
It doesn't really hurt if you want to `const_assert!` a number I guess. I mean,
|
||||||
any number other than the `MAX` value of an unsigned type or the `-1` value of
|
any number other than the `MAX` value of an unsigned type or the `-1` value of
|
||||||
an unsigned type will fail such an assertion, but I bet you'll notice that you
|
an unsigned type will fail such an assertion, but I bet you'll notice that you
|
||||||
did something wrong pretty quick.
|
did something wrong pretty quick. We could use the
|
||||||
|
[type_ascription](https://github.com/rust-lang/rust/issues/23416) feature to
|
||||||
|
really force a `bool`, but it's not that critical, so we'll avoid using a
|
||||||
|
feature that we don't need until it's stable.
|
||||||
|
|
||||||
## Asserting Something
|
## Asserting Something
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue