1
Fork 0

#[lang_item] for core::ptr::Unique

This commit is contained in:
Neven Villani 2023-06-15 17:43:23 +02:00
parent 4996b56ba9
commit dc3e91c6c2
No known key found for this signature in database
GPG key ID: 00E765FA7F4F2EDE
3 changed files with 5 additions and 0 deletions

View file

@ -32,6 +32,8 @@ use crate::ptr::NonNull;
)]
#[doc(hidden)]
#[repr(transparent)]
// Lang item used experimentally by Miri to define the semantics of `Unique`.
#[cfg_attr(not(bootstrap), lang = "ptr_unique")]
pub struct Unique<T: ?Sized> {
pointer: NonNull<T>,
// NOTE: this marker has no consequences for variance, but is necessary