Skip to content

Commit c82e76f

Browse files
committed
---
yaml --- r: 224525 b: refs/heads/beta c: 5f02de3 h: refs/heads/master i: 224523: 41c6244 v: v3
1 parent d8419b0 commit c82e76f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 14bc45477085222dcf2b87bef75ca3e7d0b5274a
26+
refs/heads/beta: 5f02de3c226bce60c58ce2bc436e69c55b90a616
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 938f5d7af401e2d8238522fed4a612943b6e77fd
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/doc/tarpl/casts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ using the `as` keyword: `expr as Type`.
99
True casts generally revolve around raw pointers and the primitive numeric
1010
types. Even though they're dangerous, these casts are *infallible* at runtime.
1111
If a cast triggers some subtle corner case no indication will be given that
12-
this occurred. The cast will simply succeed.
12+
this occurred. The cast will simply succeed. That said, casts must be valid
13+
at the type level, or else they will be prevented statically. For instance,
14+
`7u8 as bool` will not compile.
1315

1416
That said, casts aren't `unsafe` because they generally can't violate memory
1517
safety *on their own*. For instance, converting an integer to a raw pointer can

branches/beta/src/doc/tarpl/repr-rust.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ An enum is said to be *C-like* if none of its variants have associated data.
1212
For all these, individual fields are aligned to their preferred alignment. For
1313
primitives this is usually equal to their size. For instance, a u32 will be
1414
aligned to a multiple of 32 bits, and a u16 will be aligned to a multiple of 16
15-
bits. Composite structures will have a preferred alignment equal to the maximum
15+
bits. Note that some primitives may be emulated on different platforms, and as
16+
such may have strange alignment. For instance, a u64 on x86 may actually be
17+
emulated as a pair of u32s, and thus only have 32-bit alignment.
18+
19+
Composite structures will have a preferred alignment equal to the maximum
1620
of their fields' preferred alignment, and a size equal to a multiple of their
1721
preferred alignment. This ensures that arrays of T can be correctly iterated
1822
by offsetting by their size. So for instance,

0 commit comments

Comments
 (0)