We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b94bd12 commit 3ddd2efCopy full SHA for 3ddd2ef
library/core/src/ptr/metadata.rs
@@ -106,6 +106,9 @@ pub const fn metadata<T: PointeeSized>(ptr: *const T) -> <T as Pointee>::Metadat
106
/// For slices, see the documentation of [`slice::from_raw_parts`] for safety requirements.
107
/// For trait objects, the metadata must come from a pointer to the same underlying erased type.
108
///
109
+/// If you are attempting to deconstruct a DST in a generic context to be reconstructed later,
110
+/// a thin pointer can always be obtained by casting `*const T` to `*const ()`.
111
+///
112
/// [`slice::from_raw_parts`]: crate::slice::from_raw_parts
113
#[unstable(feature = "ptr_metadata", issue = "81513")]
114
#[inline]
0 commit comments