mirror of https://github.com/rust-lang/reference
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:
parent
862d6f4e71
commit
9eaa65a084
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue