Skip to content

Commit

Permalink
Update boolean.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlf authored Aug 28, 2023
1 parent bbc8063 commit d3a66eb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/types/boolean.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ boolean type for its operands, they evaluate using the rules of [boolean logic].
* `a < b` is the same as `!(a >= b)`
* `a <= b` is the same as `a == b | a < b`

## Bit validity

The single byte of a `bool` is guaranteed to be initialized (in other words,
`transmute::<bool, u8>(...)` is always sound -- but since some bit patterns
are invalid `bool`s, the inverse is not always sound).

[boolean logic]: https://en.wikipedia.org/wiki/Boolean_algebra
[enumerated type]: enum.md
[expressions]: ../expressions.md
Expand Down

0 comments on commit d3a66eb

Please sign in to comment.