Skip to content

Commit 5964acc

Browse files
committed
Remove redundant sections on bit validity
1 parent 58573b9 commit 5964acc

File tree

3 files changed

+0
-27
lines changed

3 files changed

+0
-27
lines changed

src/types/boolean.md

-8
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,6 @@ r[type.bool.expr.cmp.less]
127127
r[type.bool.expr.cmp.less-eq]
128128
* `a <= b` is the same as `a == b | a < b`
129129

130-
## Bit validity
131-
132-
r[type.bool.validity]
133-
134-
The single byte of a `bool` is guaranteed to be initialized (in other words,
135-
`transmute::<bool, u8>(...)` is always sound -- but since some bit patterns
136-
are invalid `bool`s, the inverse is not always sound).
137-
138130
[boolean logic]: https://en.wikipedia.org/wiki/Boolean_algebra
139131
[enumerated type]: enum.md
140132
[expressions]: ../expressions.md

src/types/numeric.md

-7
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ r[type.numeric.int.size.minimum]
5959
> pointer support is limited and may require explicit care and acknowledgment
6060
> from a library to support.
6161
62-
## Bit validity
63-
64-
r[type.numeric.validity]
65-
66-
For every numeric type, `T`, the bit validity of `T` is equivalent to the bit
67-
validity of `[u8; size_of::<T>()]`. An uninitialized byte is not a valid `u8`.
68-
6962
## Representation
7063

7164
r[type.numeric.repr]

src/types/textual.md

-12
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ r[type.text.str-unsized]
2929
Since `str` is a [dynamically sized type], it can only be instantiated through a
3030
pointer type, such as `&str`.
3131

32-
## Layout and bit validity
33-
34-
r[type.text.layout]
35-
36-
r[type.layout.char-layout]
37-
`char` is guaranteed to have the same size and alignment as `u32` on all platforms.
38-
39-
r[type.layout.char-validity]
40-
Every byte of a `char` is guaranteed to be initialized (in other words,
41-
`transmute::<char, [u8; size_of::<char>()]>(...)` is always sound -- but since
42-
some bit patterns are invalid `char`s, the inverse is not always sound).
43-
4432
[Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value
4533
[undefined behavior]: ../behavior-considered-undefined.md
4634
[dynamically sized type]: ../dynamically-sized-types.md

0 commit comments

Comments
 (0)