1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use core::marker::PhantomData;
#[cfg(not(no_phantom_pinned))]
use core::marker::PhantomPinned;

#[doc(hidden)]
pub trait Trivial {}

impl Trivial for () {}
impl<T: ?Sized> Trivial for PhantomData<T> {}

#[cfg(not(no_phantom_pinned))]
impl Trivial for PhantomPinned {}

#[doc(hidden)]
pub fn assert_trivial<T: Trivial>() {}