@@ -216,13 +216,13 @@ macro_rules! glib_boxed_inline_wrapper {
216
216
217
217
#[ doc( hidden) ]
218
218
impl <' a $( , $( $generic: ' a + $( $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * mut * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
219
- type Storage = Option <Vec <* const $ffi_name>>;
219
+ type Storage = ( std :: marker :: PhantomData < & ' a [ Self ] > , Option <Vec <* const $ffi_name>>) ;
220
220
221
221
fn to_glib_none_from_slice( t: & ' a [ Self ] ) -> ( * mut * const $ffi_name, Self :: Storage ) {
222
222
let mut v: Vec <_> = t. iter( ) . map( |s| & s. inner as * const $ffi_name) . collect( ) ;
223
223
v. push( std:: ptr:: null_mut( ) as * const $ffi_name) ;
224
224
225
- ( v. as_mut_ptr( ) , Some ( v) )
225
+ ( v. as_mut_ptr( ) , ( std :: marker :: PhantomData , Some ( v) ) )
226
226
}
227
227
228
228
fn to_glib_container_from_slice( t: & ' a [ Self ] ) -> ( * mut * const $ffi_name, Self :: Storage ) {
@@ -236,7 +236,7 @@ macro_rules! glib_boxed_inline_wrapper {
236
236
v_ptr
237
237
} ;
238
238
239
- ( v_ptr, None )
239
+ ( v_ptr, ( std :: marker :: PhantomData , None ) )
240
240
}
241
241
242
242
fn to_glib_full_from_slice( t: & [ Self ] ) -> * mut * const $ffi_name {
@@ -254,7 +254,7 @@ macro_rules! glib_boxed_inline_wrapper {
254
254
255
255
#[ doc( hidden) ]
256
256
impl <' a $( , $( $generic: ' a + $( $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * const * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
257
- type Storage = Option <Vec <* const $ffi_name>>;
257
+ type Storage = ( std :: marker :: PhantomData < & ' a [ Self ] > , Option <Vec <* const $ffi_name>>) ;
258
258
259
259
fn to_glib_none_from_slice( t: & ' a [ Self ] ) -> ( * const * const $ffi_name, Self :: Storage ) {
260
260
let ( ptr, stash) = $crate:: translate:: ToGlibContainerFromSlice :: <' a, * mut * const $ffi_name>:: to_glib_none_from_slice( t) ;
0 commit comments