Skip to content
This repository was archived by the owner on Dec 31, 2025. It is now read-only.

Commit ceb3f0e

Browse files
author
toasteater
authored
Merge pull request #317 from Bromeon/bugfix/doc-in-macro
Fix new_ref() documentation ignored by macro
2 parents ead415a + 8e9795f commit ceb3f0e

12 files changed

Lines changed: 2 additions & 12 deletions

gdnative-core/src/byte_array.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ impl ByteArray {
112112
}
113113

114114
impl_common_methods! {
115-
/// Creates a new reference to this array.
116115
pub fn new_ref(& self) -> ByteArray : godot_pool_byte_array_new_copy;
117116
}
118117
}

gdnative-core/src/color_array.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ impl ColorArray {
116116
}
117117

118118
impl_common_methods! {
119-
/// Creates a new reference to this array.
120119
pub fn new_ref(&self) -> ColorArray : godot_pool_color_array_new_copy;
121120
}
122121
}

gdnative-core/src/dictionary.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ impl Dictionary {
109109
}
110110

111111
impl_common_methods! {
112-
/// Creates a new reference to this dictionary.
113112
pub fn new_ref(&self) -> Dictionary : godot_dictionary_new_copy;
114113
}
115114
}

gdnative-core/src/float32_array.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ impl Float32Array {
112112
}
113113

114114
impl_common_methods! {
115-
/// Creates a new reference to this array.
116115
pub fn new_ref(&self) -> Float32Array : godot_pool_real_array_new_copy;
117116
}
118117
}

gdnative-core/src/int32_array.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ impl Int32Array {
112112
}
113113

114114
impl_common_methods! {
115-
/// Creates a new reference to this array.
116115
pub fn new_ref(& self) -> Int32Array : godot_pool_int_array_new_copy;
117116
}
118117
}

gdnative-core/src/macros.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ macro_rules! impl_common_method {
293293
pub fn new_ref(&self) -> $Type:ident : $gd_method:ident
294294
) => {
295295
$(#[$attr])*
296+
/// Creates a new reference to this reference-counted instance.
296297
pub fn new_ref(&self) -> $Type {
297298
unsafe {
298299
let mut result = Default::default();
@@ -311,8 +312,8 @@ macro_rules! impl_common_methods {
311312
)*
312313
) => (
313314
$(
314-
$(#[$attr])*
315315
impl_common_method!(
316+
$(#[$attr])*
316317
pub fn $name(&self $(,$pname : $pty)*) -> $Ty : $gd_method
317318
);
318319
)*

gdnative-core/src/node_path.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ impl NodePath {
103103
}
104104

105105
impl_common_methods! {
106-
/// Creates a new reference to this node path.
107106
pub fn new_ref(&self) -> NodePath : godot_node_path_new_copy;
108107
}
109108
}

gdnative-core/src/string.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ impl GodotString {
181181
// TODO: many missing methods.
182182

183183
impl_common_methods! {
184-
/// Creates a new reference to this array.
185184
pub fn new_ref(&self) -> GodotString : godot_string_new_copy;
186185
}
187186
}

gdnative-core/src/string_array.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ impl StringArray {
113113
}
114114

115115
impl_common_methods! {
116-
/// Creates a new reference to this array.
117116
pub fn new_ref(&self) -> StringArray : godot_pool_string_array_new_copy;
118117
}
119118
}

gdnative-core/src/variant_array.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ impl VariantArray {
175175
}
176176

177177
impl_common_methods! {
178-
/// Creates a new reference to this array.
179178
pub fn new_ref(&self) -> VariantArray : godot_array_new_copy;
180179
}
181180
}

0 commit comments

Comments
 (0)