1 use { 2 crate::{Arbitrary, Result, Unstructured}, 3 core::marker::{PhantomData, PhantomPinned}, 4 }; 5 6 impl<'a, A> Arbitrary<'a> for PhantomData<A> 7 where 8 A: ?Sized, 9 { arbitrary(_: &mut Unstructured<'a>) -> Result<Self>10 fn arbitrary(_: &mut Unstructured<'a>) -> Result<Self> { 11 Ok(PhantomData) 12 } 13 14 #[inline] size_hint(_depth: usize) -> (usize, Option<usize>)15 fn size_hint(_depth: usize) -> (usize, Option<usize>) { 16 (0, Some(0)) 17 } 18 } 19 20 impl<'a> Arbitrary<'a> for PhantomPinned { arbitrary(_: &mut Unstructured<'a>) -> Result<Self>21 fn arbitrary(_: &mut Unstructured<'a>) -> Result<Self> { 22 Ok(PhantomPinned) 23 } 24 25 #[inline] size_hint(_depth: usize) -> (usize, Option<usize>)26 fn size_hint(_depth: usize) -> (usize, Option<usize>) { 27 (0, Some(0)) 28 } 29 } 30