From d3a66eb69892b25794b2d82a1249ec01d8ead9f1 Mon Sep 17 00:00:00 2001 From: Joshua Liebow-Feeser Date: Mon, 28 Aug 2023 11:12:57 -0700 Subject: [PATCH] Update boolean.md --- src/types/boolean.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/boolean.md b/src/types/boolean.md index d8984025f..7ea99d185 100644 --- a/src/types/boolean.md +++ b/src/types/boolean.md @@ -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::(...)` 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