File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -668,9 +668,11 @@ impl<T: ?Sized> !Sync for *mut T {}
668
668
///
669
669
/// ## Ownership and the drop check
670
670
///
671
- /// Adding a field of type `PhantomData<T>` indicates that your type *owns* data of type `T`. This
672
- /// in turn has effects on the Rust compiler's [drop check] analysis, but that only matters in very
673
- /// specific circumstances. For the exact rules, see the [drop check] documentation.
671
+ /// The exact interaction of `PhantomData` with drop check **may change in the future**.
672
+ ///
673
+ /// Currently, adding a field of type `PhantomData<T>` indicates that your type *owns* data of type
674
+ /// `T` in very rare circumstances. This in turn has effects on the Rust compiler's [drop check]
675
+ /// analysis. For the exact rules, see the [drop check] documentation.
674
676
///
675
677
/// ## Layout
676
678
///
Original file line number Diff line number Diff line change 168
168
/// The Nomicon discusses the need for [drop check in more detail][drop check].
169
169
///
170
170
/// To reject such code, the "drop check" analysis determines which types and lifetimes need to
171
- /// still be live when `T` gets dropped:
171
+ /// still be live when `T` gets dropped. The exact details of this analysis are not yet
172
+ /// stably guaranteed and **subject to change**. Currently, the analysis works as follows:
172
173
/// - If `T` has no drop glue, then trivially nothing is required to be live. This is the case if
173
174
/// neither `T` nor any of its (recursive) fields have a destructor (`impl Drop`). [`PhantomData`]
174
175
/// and [`ManuallyDrop`] are considered to never have a destructor, no matter their field type.
You can’t perform that action at this time.
0 commit comments