Skip to content

Commit fb966d2

Browse files
authored
Rollup merge of rust-lang#128497 - Bryanskiy:fix-dropck-doc, r=lcnr
fix dropck documentation for `[T;0]` special-case fixes rust-lang#110288. r? ``@lcnr``
2 parents ab00ae6 + a8a4659 commit fb966d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/src/ops/drop.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,13 @@
171171
/// still be live when `T` gets dropped. The exact details of this analysis are not yet
172172
/// stably guaranteed and **subject to change**. Currently, the analysis works as follows:
173173
/// - If `T` has no drop glue, then trivially nothing is required to be live. This is the case if
174-
/// neither `T` nor any of its (recursive) fields have a destructor (`impl Drop`). [`PhantomData`]
175-
/// and [`ManuallyDrop`] are considered to never have a destructor, no matter their field type.
174+
/// neither `T` nor any of its (recursive) fields have a destructor (`impl Drop`). [`PhantomData`],
175+
/// arrays of length 0 and [`ManuallyDrop`] are considered to never have a destructor, no matter
176+
/// their field type.
176177
/// - If `T` has drop glue, then, for all types `U` that are *owned* by any field of `T`,
177178
/// recursively add the types and lifetimes that need to be live when `U` gets dropped. The set of
178179
/// owned types is determined by recursively traversing `T`:
179-
/// - Recursively descend through `PhantomData`, `Box`, tuples, and arrays (including arrays of
180+
/// - Recursively descend through `PhantomData`, `Box`, tuples, and arrays (excluding arrays of
180181
/// length 0).
181182
/// - Stop at reference and raw pointer types as well as function pointers and function items;
182183
/// they do not own anything.

0 commit comments

Comments
 (0)