@@ -10,6 +10,7 @@ macro_rules! glib_boxed_inline_wrapper {
10
10
( [ $( $attr: meta) * ] $visibility: vis $name: ident $( <$( $generic: ident $( : $bound: tt $( + $bound2: tt) * ) ?) ,+>) ?, $ffi_name: ty
11
11
$( , @type_ $get_type_expr: expr) ?) => {
12
12
$( #[ $attr] ) *
13
+ #[ doc = "\n \n GLib type: Inline allocated boxed type with stack copy semantics." ]
13
14
#[ repr( transparent) ]
14
15
$visibility struct $name $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? {
15
16
pub ( crate ) inner: $ffi_name,
@@ -18,6 +19,7 @@ macro_rules! glib_boxed_inline_wrapper {
18
19
19
20
#[ allow( clippy:: incorrect_clone_impl_on_copy_type) ]
20
21
impl $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? std:: clone:: Clone for $name $( <$( $generic) ,+>) ? {
22
+ #[ doc = "Copies the inline boxed type by value with the type-specific copy function." ]
21
23
#[ inline]
22
24
fn clone( & self ) -> Self {
23
25
Self {
@@ -43,6 +45,7 @@ macro_rules! glib_boxed_inline_wrapper {
43
45
@copy $copy_arg: ident $copy_expr: expr, @free $free_arg: ident $free_expr: expr
44
46
$( , @type_ $get_type_expr: expr) ?) => {
45
47
$( #[ $attr] ) *
48
+ #[ doc = "\n \n GLib type: Inline allocated boxed type with stack copy semantics." ]
46
49
#[ repr( transparent) ]
47
50
$visibility struct $name $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? {
48
51
pub ( crate ) inner: $ffi_name,
@@ -52,6 +55,7 @@ macro_rules! glib_boxed_inline_wrapper {
52
55
#[ allow( clippy:: incorrect_clone_impl_on_copy_type) ]
53
56
#[ allow( clippy:: non_canonical_clone_impl) ]
54
57
impl $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? std:: clone:: Clone for $name $( <$( $generic) ,+>) ? {
58
+ #[ doc = "Copies the inline boxed type by value with the type-specific copy function." ]
55
59
#[ inline]
56
60
fn clone( & self ) -> Self {
57
61
Self {
@@ -76,13 +80,15 @@ macro_rules! glib_boxed_inline_wrapper {
76
80
@init $init_arg: ident $init_expr: expr, @copy_into $copy_into_arg_dest: ident $copy_into_arg_src: ident $copy_into_expr: expr, @clear $clear_arg: ident $clear_expr: expr
77
81
$( , @type_ $get_type_expr: expr) ?) => {
78
82
$( #[ $attr] ) *
83
+ #[ doc = "\n \n GLib type: Inline allocated boxed type with stack copy semantics." ]
79
84
#[ repr( transparent) ]
80
85
$visibility struct $name $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? {
81
86
pub ( crate ) inner: $ffi_name,
82
87
$( pub ( crate ) phantom: std:: marker:: PhantomData <$( $generic) ,+>, ) ?
83
88
}
84
89
85
90
impl $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? std:: clone:: Clone for $name $( <$( $generic) ,+>) ? {
91
+ #[ doc = "Copies the inline boxed type by value with the type-specific copy function." ]
86
92
#[ inline]
87
93
fn clone( & self ) -> Self {
88
94
unsafe {
@@ -117,13 +123,15 @@ macro_rules! glib_boxed_inline_wrapper {
117
123
@init $init_arg: ident $init_expr: expr, @copy_into $copy_into_arg_dest: ident $copy_into_arg_src: ident $copy_into_expr: expr, @clear $clear_arg: ident $clear_expr: expr
118
124
$( , @type_ $get_type_expr: expr) ?) => {
119
125
$( #[ $attr] ) *
126
+ #[ doc = "\n \n GLib type: Inline allocated boxed type with stack copy semantics." ]
120
127
#[ repr( transparent) ]
121
128
$visibility struct $name $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? {
122
129
pub ( crate ) inner: $ffi_name,
123
130
$( pub ( crate ) phantom: std:: marker:: PhantomData <$( $generic) ,+>, ) ?
124
131
}
125
132
126
133
impl $( <$( $generic $( : $bound $( + $bound2) * ) ?) ,+>) ? std:: clone:: Clone for $name $( <$( $generic) ,+>) ? {
134
+ #[ doc = "Copies the inline boxed type by value with the type-specific copy function." ]
127
135
#[ inline]
128
136
fn clone( & self ) -> Self {
129
137
unsafe {
0 commit comments