Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/test-utils/src/minicore.rs')
-rw-r--r--crates/test-utils/src/minicore.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/crates/test-utils/src/minicore.rs b/crates/test-utils/src/minicore.rs
index 26e0f46705..7c3e7fea1b 100644
--- a/crates/test-utils/src/minicore.rs
+++ b/crates/test-utils/src/minicore.rs
@@ -55,7 +55,7 @@
//! panic: fmt
//! phantom_data:
//! pin:
-//! pointee: copy, send, sync, ord, hash, unpin
+//! pointee: copy, send, sync, ord, hash, unpin, phantom_data
//! range:
//! receiver: deref
//! result:
@@ -504,6 +504,16 @@ pub mod ptr {
#[lang = "metadata_type"]
type Metadata: Copy + Send + Sync + Ord + Hash + Unpin;
}
+
+ #[lang = "dyn_metadata"]
+ pub struct DynMetadata<Dyn: PointeeSized> {
+ _phantom: crate::marker::PhantomData<Dyn>,
+ }
+
+ pub const fn metadata<T: PointeeSized>(ptr: *const T) -> <T as Pointee>::Metadata {
+ loop {}
+ }
+
// endregion:pointee
// region:non_null
#[rustc_layout_scalar_valid_range_start(1)]