Skip to content

Commit 179dc7d

Browse files
Remove note about soundness hole in type-layout.md
Issue rust-lang/rust#27060 has been resolved, so it is no longer possible to safely create unaligned pointers to packed struct fields.
1 parent 0f85268 commit 179dc7d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/type-layout.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -549,13 +549,7 @@ The `align` modifier can also be applied on an `enum`.
549549
When it is, the effect on the `enum`'s alignment is the same as if the `enum`
550550
was wrapped in a newtype `struct` with the same `align` modifier.
551551

552-
<div class="warning">
553-
554-
***Warning:*** Dereferencing an unaligned pointer is [undefined behavior] and
555-
it is possible to [safely create unaligned pointers to `packed` fields][27060].
556-
Like all ways to create undefined behavior in safe Rust, this is a bug.
557-
558-
</div>
552+
Dereferencing an unaligned pointer is [undefined behavior].
559553

560554
### The `transparent` Representation
561555

0 commit comments

Comments
 (0)