File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 6
6
# Summary
7
7
[ summary ] : #summary
8
8
9
- Unions do not allow fields of types that require drop glue, but they may still
10
- ` impl Drop ` themselves. We specify when one may move out of a union field and
11
- when the union's ` drop ` is called. To avoid undesired implicit calls of drop,
12
- we also restrict the use of ` DerefMut ` when unions are involved.
9
+ Unions do not allow fields of types that require drop glue (the code that is
10
+ automatically run when a variables goes out of scope: recursively dropping the
11
+ variable and all its fields), but they may still ` impl Drop ` themselves. We
12
+ specify when one may move out of a union field and when the union's ` drop ` is
13
+ called. To avoid undesired implicit calls of drop, we also restrict the use of
14
+ ` DerefMut ` when unions are involved.
13
15
14
16
# Motivation
15
17
[ motivation ] : #motivation
You can’t perform that action at this time.
0 commit comments