Skip to content

Commit

Permalink
Unrolled build for rust-lang#128497
Browse files Browse the repository at this point in the history
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``
  • Loading branch information
rust-timer authored Aug 1, 2024
2 parents e60ebb2 + c8a3caf commit 8581347
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions library/core/src/ops/drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,13 @@
/// still be live when `T` gets dropped. The exact details of this analysis are not yet
/// stably guaranteed and **subject to change**. Currently, the analysis works as follows:
/// - If `T` has no drop glue, then trivially nothing is required to be live. This is the case if
/// neither `T` nor any of its (recursive) fields have a destructor (`impl Drop`). [`PhantomData`]
/// and [`ManuallyDrop`] are considered to never have a destructor, no matter their field type.
/// neither `T` nor any of its (recursive) fields have a destructor (`impl Drop`). [`PhantomData`],
/// arrays of length 0 and [`ManuallyDrop`] are considered to never have a destructor, no matter
/// their field type.
/// - If `T` has drop glue, then, for all types `U` that are *owned* by any field of `T`,
/// recursively add the types and lifetimes that need to be live when `U` gets dropped. The set of
/// owned types is determined by recursively traversing `T`:
/// - Recursively descend through `PhantomData`, `Box`, tuples, and arrays (including arrays of
/// - Recursively descend through `PhantomData`, `Box`, tuples, and arrays (excluding arrays of
/// length 0).
/// - Stop at reference and raw pointer types as well as function pointers and function items;
/// they do not own anything.
Expand Down

0 comments on commit 8581347

Please sign in to comment.