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.
2 parents e420e45 + 3ddd2ef commit 0c02bdcCopy full SHA for 0c02bdc
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]
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments