@@ -13,15 +13,15 @@ macro_rules! glib_boxed_inline_wrapper {
13
13
#[ repr( transparent) ]
14
14
$visibility struct $name $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? {
15
15
pub ( crate ) inner: $ffi_name,
16
- pub ( crate ) phantom: std:: marker:: PhantomData <( $( $( $ generic) ,+) ? ) > ,
16
+ $ ( pub ( crate ) phantom: std:: marker:: PhantomData <$( $generic) ,+> , ) ?
17
17
}
18
18
19
19
impl $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? std:: clone:: Clone for $name $( <$( $generic) ,+>) ? {
20
20
#[ inline]
21
21
fn clone( & self ) -> Self {
22
22
Self {
23
23
inner: std:: clone:: Clone :: clone( & self . inner) ,
24
- phantom: std:: marker:: PhantomData ,
24
+ $ ( phantom: std:: marker:: PhantomData :: <$ ( $generic ) ,+> ) ?
25
25
}
26
26
}
27
27
}
@@ -45,15 +45,15 @@ macro_rules! glib_boxed_inline_wrapper {
45
45
#[ repr( transparent) ]
46
46
$visibility struct $name $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? {
47
47
pub ( crate ) inner: $ffi_name,
48
- pub ( crate ) phantom: std:: marker:: PhantomData <( $( $( $ generic) ,+) ? ) > ,
48
+ $ ( pub ( crate ) phantom: std:: marker:: PhantomData <$( $generic) ,+> , ) ?
49
49
}
50
50
51
51
impl $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? std:: clone:: Clone for $name $( <$( $generic) ,+>) ? {
52
52
#[ inline]
53
53
fn clone( & self ) -> Self {
54
54
Self {
55
55
inner: std:: clone:: Clone :: clone( & self . inner) ,
56
- phantom: std:: marker:: PhantomData ,
56
+ $ ( phantom: std:: marker:: PhantomData :: <$ ( $generic ) ,+> ) ?
57
57
}
58
58
}
59
59
}
@@ -76,7 +76,7 @@ macro_rules! glib_boxed_inline_wrapper {
76
76
#[ repr( transparent) ]
77
77
$visibility struct $name $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? {
78
78
pub ( crate ) inner: $ffi_name,
79
- pub ( crate ) phantom: std:: marker:: PhantomData <( $( $( $ generic) ,+) ? ) > ,
79
+ $ ( pub ( crate ) phantom: std:: marker:: PhantomData <$( $generic) ,+> , ) ?
80
80
}
81
81
82
82
impl $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? std:: clone:: Clone for $name $( <$( $generic) ,+>) ? {
@@ -116,7 +116,7 @@ macro_rules! glib_boxed_inline_wrapper {
116
116
#[ repr( transparent) ]
117
117
$visibility struct $name $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? {
118
118
pub ( crate ) inner: $ffi_name,
119
- pub ( crate ) phantom: std:: marker:: PhantomData <( $( $( $ generic) ,+) ? ) > ,
119
+ $ ( pub ( crate ) phantom: std:: marker:: PhantomData <$( $generic) ,+> , ) ?
120
120
}
121
121
122
122
impl $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? std:: clone:: Clone for $name $( <$( $generic) ,+>) ? {
@@ -164,7 +164,7 @@ macro_rules! glib_boxed_inline_wrapper {
164
164
init( v. as_mut_ptr( ) ) ;
165
165
Self {
166
166
inner: v. assume_init( ) ,
167
- phantom: std:: marker:: PhantomData ,
167
+ $ ( phantom: std:: marker:: PhantomData :: <$ ( $generic ) ,+> ) ?
168
168
}
169
169
}
170
170
}
@@ -174,13 +174,13 @@ macro_rules! glib_boxed_inline_wrapper {
174
174
unsafe fn unsafe_from( t: $ffi_name) -> Self {
175
175
Self {
176
176
inner: t,
177
- phantom: std:: marker:: PhantomData ,
177
+ $ ( phantom: std:: marker:: PhantomData :: <$ ( $generic ) ,+> ) ?
178
178
}
179
179
}
180
180
}
181
181
182
182
#[ doc( hidden) ]
183
- impl <' a $( , $( $generic $ ( : $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibPtr <' a, * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
183
+ impl <' a $( , $( $generic: ' a + $ ( $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibPtr <' a, * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
184
184
type Storage = & ' a Self ;
185
185
186
186
#[ inline]
@@ -198,7 +198,7 @@ macro_rules! glib_boxed_inline_wrapper {
198
198
}
199
199
200
200
#[ doc( hidden) ]
201
- impl <' a $( , $( $generic $ ( : $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibPtrMut <' a, * mut $ffi_name> for $name $( <$( $generic) ,+>) ? {
201
+ impl <' a $( , $( $generic: ' a + $ ( $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibPtrMut <' a, * mut $ffi_name> for $name $( <$( $generic) ,+>) ? {
202
202
type Storage = & ' a mut Self ;
203
203
204
204
#[ inline]
@@ -209,7 +209,7 @@ macro_rules! glib_boxed_inline_wrapper {
209
209
}
210
210
211
211
#[ doc( hidden) ]
212
- impl <' a $( , $( $generic $ ( : $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * mut * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
212
+ impl <' a $( , $( $generic: ' a + $ ( $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * mut * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
213
213
type Storage = Option <Vec <* const $ffi_name>>;
214
214
215
215
fn to_glib_none_from_slice( t: & ' a [ Self ] ) -> ( * mut * const $ffi_name, Self :: Storage ) {
@@ -247,7 +247,7 @@ macro_rules! glib_boxed_inline_wrapper {
247
247
}
248
248
249
249
#[ doc( hidden) ]
250
- impl <' a $( , $( $generic $ ( : $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * const * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
250
+ impl <' a $( , $( $generic: ' a + $ ( $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * const * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
251
251
type Storage = Option <Vec <* const $ffi_name>>;
252
252
253
253
fn to_glib_none_from_slice( t: & ' a [ Self ] ) -> ( * const * const $ffi_name, Self :: Storage ) {
@@ -267,7 +267,7 @@ macro_rules! glib_boxed_inline_wrapper {
267
267
}
268
268
269
269
#[ doc( hidden) ]
270
- impl <' a $( , $( $generic $ ( : $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * mut $ffi_name> for $name $( <$( $generic) ,+>) ? {
270
+ impl <' a $( , $( $generic: ' a + $ ( $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * mut $ffi_name> for $name $( <$( $generic) ,+>) ? {
271
271
type Storage = Option <& ' a [ Self ] >;
272
272
273
273
fn to_glib_none_from_slice( t: & ' a [ Self ] ) -> ( * mut $ffi_name, Self :: Storage ) {
@@ -298,7 +298,7 @@ macro_rules! glib_boxed_inline_wrapper {
298
298
}
299
299
300
300
#[ doc( hidden) ]
301
- impl <' a $( , $( $generic $ ( : $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
301
+ impl <' a $( , $( $generic: ' a $ ( $bound $( + $bound2) * ) ?) ,+) ?> $crate:: translate:: ToGlibContainerFromSlice <' a, * const $ffi_name> for $name $( <$( $generic) ,+>) ? {
302
302
type Storage = Option <& ' a [ Self ] >;
303
303
304
304
fn to_glib_none_from_slice( t: & ' a [ Self ] ) -> ( * const $ffi_name, Self :: Storage ) {
@@ -372,7 +372,7 @@ macro_rules! glib_boxed_inline_wrapper {
372
372
373
373
$crate:: translate:: Borrowed :: new( Self {
374
374
inner: std:: ptr:: read( ptr) ,
375
- phantom: std:: marker:: PhantomData ,
375
+ $ ( phantom: std:: marker:: PhantomData :: <$ ( $generic ) ,+> ) ?
376
376
} )
377
377
}
378
378
}
@@ -427,7 +427,7 @@ macro_rules! glib_boxed_inline_wrapper {
427
427
428
428
let mut res = Vec :: with_capacity( num) ;
429
429
for i in 0 ..num {
430
- res. push( std:: ptr:: read( ptr. add( i) as * const $name) ) ;
430
+ res. push( std:: ptr:: read( ptr. add( i) as * const $name $ ( <$ ( $generic ) ,+> ) ? ) ) ;
431
431
}
432
432
$crate:: ffi:: g_free( ptr as * mut _) ;
433
433
res
@@ -495,26 +495,26 @@ macro_rules! glib_boxed_inline_wrapper {
495
495
}
496
496
497
497
#[ doc( hidden) ]
498
- impl $( <$( $generic $ ( : $bound $( + $bound2) * ) ?) ,+>) ? $crate:: value:: ValueType for $name $( <$( $generic) ,+>) ? {
498
+ impl $( <$( $generic: ' static + $ ( $bound $( + $bound2) * ) ?) ,+>) ? $crate:: value:: ValueType for $name $( <$( $generic) ,+>) ? {
499
499
type Type = Self ;
500
500
}
501
501
502
502
#[ doc( hidden) ]
503
- unsafe impl < ' a> $crate:: value:: FromValue <' a > for $name $( <$( $generic) ,+>) ? {
503
+ unsafe impl $ ( <$ ( $generic $ ( : $bound $ ( + $bound2 ) * ) ? ) ,+> ) ? $crate:: value:: FromValue <' _ > for $name $( <$( $generic) ,+>) ? {
504
504
type Checker = $crate:: value:: GenericValueTypeOrNoneChecker <Self >;
505
505
506
- unsafe fn from_value( value: & ' a $crate:: Value ) -> Self {
506
+ unsafe fn from_value( value: & ' _ $crate:: Value ) -> Self {
507
507
let ptr = $crate:: gobject_ffi:: g_value_get_boxed( $crate:: translate:: ToGlibPtr :: to_glib_none( value) . 0 ) ;
508
508
assert!( !ptr. is_null( ) ) ;
509
509
<Self as $crate:: translate:: FromGlibPtrNone <* const $ffi_name>>:: from_glib_none( ptr as * const $ffi_name)
510
510
}
511
511
}
512
512
513
513
#[ doc( hidden) ]
514
- unsafe impl < ' a> $crate:: value:: FromValue <' a > for & ' a $name $( <$( $generic) ,+>) ? {
514
+ unsafe impl $ ( <$ ( $generic $ ( : $bound $ ( + $bound2 ) * ) ? ) ,+> ) ? $crate:: value:: FromValue <' _ > for & ' _ $name $( <$( $generic) ,+>) ? {
515
515
type Checker = $crate:: value:: GenericValueTypeOrNoneChecker <Self >;
516
516
517
- unsafe fn from_value( value: & ' a $crate:: Value ) -> Self {
517
+ unsafe fn from_value( value: & ' _ $crate:: Value ) -> Self {
518
518
let ptr = $crate:: gobject_ffi:: g_value_get_boxed( $crate:: translate:: ToGlibPtr :: to_glib_none( value) . 0 ) ;
519
519
assert!( !ptr. is_null( ) ) ;
520
520
& * ( ptr as * const $ffi_name as * const $name $( <$( $generic) ,+>) ?)
@@ -540,7 +540,7 @@ macro_rules! glib_boxed_inline_wrapper {
540
540
}
541
541
542
542
#[ doc( hidden) ]
543
- impl $( <$( $generic $ ( : $bound $( + $bound2) * ) ?) ,+>) ? $crate:: value:: ToValueOptional for $name $( <$( $generic) ,+>) ? {
543
+ impl $( <$( $generic: ' static + $ ( $bound $( + $bound2) * ) ?) ,+>) ? $crate:: value:: ToValueOptional for $name $( <$( $generic) ,+>) ? {
544
544
fn to_value_optional( s: Option <& Self >) -> $crate:: Value {
545
545
let mut value = $crate:: Value :: for_value_type:: <Self >( ) ;
546
546
unsafe {
0 commit comments