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