Remove note about soundness hole in type-layout.md

Issue https://github.com/rust-lang/rust/issues/27060 has been resolved, so it is no longer possible to safely create unaligned pointers to packed struct fields.
This commit is contained in:
Andrius Pukšta 2023-06-14 08:49:57 +03:00 committed by GitHub
parent 862d6f4e71
commit 9eaa65a084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -549,13 +549,7 @@ The `align` modifier can also be applied on an `enum`.
When it is, the effect on the `enum`'s alignment is the same as if the `enum`
was wrapped in a newtype `struct` with the same `align` modifier.
<div class="warning">
***Warning:*** Dereferencing an unaligned pointer is [undefined behavior] and
it is possible to [safely create unaligned pointers to `packed` fields][27060].
Like all ways to create undefined behavior in safe Rust, this is a bug.
</div>
Dereferencing an unaligned pointer is [undefined behavior].
### The `transparent` Representation