@@ -947,12 +947,12 @@ pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized {
947947 where
948948 F : FnOnce ( Pin < & mut T > ) -> Result < ( ) , E > ,
949949 {
950- ChainPinInit ( self , f, PhantomData )
950+ ChainPinInit ( self , f, __internal :: PhantomInvariant :: new ( ) )
951951 }
952952}
953953
954954/// An initializer returned by [`PinInit::pin_chain`].
955- pub struct ChainPinInit < I , F , T : ?Sized , E > ( I , F , __internal:: Invariant < ( E , T ) > ) ;
955+ pub struct ChainPinInit < I , F , T : ?Sized , E > ( I , F , __internal:: PhantomInvariant < ( E , T ) > ) ;
956956
957957// SAFETY: The `__pinned_init` function is implemented such that it
958958// - returns `Ok(())` on successful initialization,
@@ -1055,12 +1055,12 @@ pub unsafe trait Init<T: ?Sized, E = Infallible>: PinInit<T, E> {
10551055 where
10561056 F : FnOnce ( & mut T ) -> Result < ( ) , E > ,
10571057 {
1058- ChainInit ( self , f, PhantomData )
1058+ ChainInit ( self , f, __internal :: PhantomInvariant :: new ( ) )
10591059 }
10601060}
10611061
10621062/// An initializer returned by [`Init::chain`].
1063- pub struct ChainInit < I , F , T : ?Sized , E > ( I , F , __internal:: Invariant < ( E , T ) > ) ;
1063+ pub struct ChainInit < I , F , T : ?Sized , E > ( I , F , __internal:: PhantomInvariant < ( E , T ) > ) ;
10641064
10651065// SAFETY: The `__init` function is implemented such that it
10661066// - returns `Ok(())` on successful initialization,
@@ -1108,7 +1108,7 @@ where
11081108pub const unsafe fn pin_init_from_closure < T : ?Sized , E > (
11091109 f : impl FnOnce ( * mut T ) -> Result < ( ) , E > ,
11101110) -> impl PinInit < T , E > {
1111- __internal:: InitClosure ( f, PhantomData )
1111+ __internal:: InitClosure ( f, __internal :: PhantomInvariant :: new ( ) )
11121112}
11131113
11141114/// Creates a new [`Init<T, E>`] from the given closure.
@@ -1127,7 +1127,7 @@ pub const unsafe fn pin_init_from_closure<T: ?Sized, E>(
11271127pub const unsafe fn init_from_closure < T : ?Sized , E > (
11281128 f : impl FnOnce ( * mut T ) -> Result < ( ) , E > ,
11291129) -> impl Init < T , E > {
1130- __internal:: InitClosure ( f, PhantomData )
1130+ __internal:: InitClosure ( f, __internal :: PhantomInvariant :: new ( ) )
11311131}
11321132
11331133/// Changes the to be initialized type.
0 commit comments