Skip to content

Commit

Permalink
add ManuallyDrop link
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Huss <eric@huss.org>
  • Loading branch information
RalfJung and ehuss committed Oct 18, 2020
1 parent 0c8df59 commit 0d6f579
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/items/unions.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ field accesses.

When a union is dropped, it cannot know which of its fields needs to be dropped.
For this reason, all union fields must either be of a `Copy` type or of the
shape `ManuallyDrop<_>`. This ensures that a union does not need to drop
shape [`ManuallyDrop<_>`]. This ensures that a union does not need to drop
anything when it goes out of scope.

Like for structs and enums, it is possible to `impl Drop` for a union to
Expand Down Expand Up @@ -177,3 +177,4 @@ checking, etc etc etc).
[_WhereClause_]: generics.md#where-clauses
[_StructFields_]: structs.md
[`transmute`]: ../../std/mem/fn.transmute.html
[`ManuallyDrop<_>`]: ../../std/mem/struct.ManuallyDrop.html

0 comments on commit 0d6f579

Please sign in to comment.