Diffstat (limited to 'src/any/indirect.rs')
-rw-r--r--src/any/indirect.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/any/indirect.rs b/src/any/indirect.rs
index eef24f0..ae70ef3 100644
--- a/src/any/indirect.rs
+++ b/src/any/indirect.rs
@@ -16,7 +16,7 @@ pub trait HigherKinded<'a> {
pub trait Indirect<'a>: HigherKinded<'a> + sealed::Sealed<'a> {}
pub(super) mod sealed {
- use core::marker::PhantomData;
+ use crate::hkt::{Invariant, Marker};
use super::*;
@@ -41,14 +41,16 @@ pub(super) mod sealed {
#[repr(transparent)]
pub struct RawIndirect<'a, I> {
indirect: MaybeUninit<[u8; INDIRECT_SIZE]>,
- _marker: PhantomData<fn(&'a ()) -> (&'a (), I)>,
+ _lifetime: Invariant<'a>,
+ _generic: Marker<I>
}
impl<'a, I: Indirect<'a>> RawIndirect<'a, I> {
pub fn new<T: ?Sized>(indirect: I::ForT<T>) -> Self {
Self {
indirect: I::into_raw(indirect),
- _marker: PhantomData,
+ _lifetime: Default::default(),
+ _generic: Default::default()
}
}