Skip to content

Commit 044b9ba

Browse files
committed
glib: Add a doc string for as_ptr generated impls
In some of my projects we use `#![deny(missing_docs)]`, and this trips up on these new generated `as_ptr` functions. Document them on general principle.
1 parent 684c326 commit 044b9ba

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

glib/src/boxed.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ macro_rules! glib_boxed_wrapper {
3636
}
3737

3838
impl $(<$($generic $(: $bound $(+ $bound2)*)?),+>)? $name $(<$($generic),+>)? {
39+
#[doc = "Return the inner pointer to the underlying C value."]
3940
pub fn as_ptr(&self) -> *mut $ffi_name {
4041
$crate::translate::ToGlibPtr::to_glib_none(&self.inner).0 as *mut _
4142
}

glib/src/shared.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ macro_rules! glib_shared_wrapper {
3434
}
3535

3636
impl $(<$($generic $(: $bound $(+ $bound2)*)?),+>)? $name $(<$($generic),+>)? {
37+
#[doc = "Return the inner pointer to the underlying C value."]
3738
pub fn as_ptr(&self) -> *mut $ffi_name {
3839
$crate::translate::ToGlibPtr::to_glib_none(&self.inner).0 as *mut _
3940
}

0 commit comments

Comments
 (0)