rustdoc-stripper fails to strip some docs correctly
bilelmoussaoui opened this issue · comments
Bilal Elmoussaoui commented
The issue can easily be reproduced with cloning the gtk4-rs repository and running
python3 generator.py --embed-docs gdk4
and then
python3 generator.py --strip-docs gdk4
and then things break on gdk4/src/functions.rs
Here's a git diff of running both embed-docs & then strip-docs
diff --git a/gdk4/src/functions.rs b/gdk4/src/functions.rs
index f5f34af..501e3e6 100644
--- a/gdk4/src/functions.rs
+++ b/gdk4/src/functions.rs
@@ -28,9 +28,8 @@ pub fn pango_layout_line_get_clip_region(
mut_override(ptr),
(index_ranges.len() / 2) as i32,
))
- }
}
-
+/// a clip region containing the given ranges
#[doc(alias = "gdk_pango_layout_get_clip_region")]
pub fn pango_layout_get_clip_region(
layout: &pango::Layout,
@@ -51,7 +50,7 @@ pub fn pango_layout_get_clip_region(
))
}
}
-
+/// callback to call when the operation is done
#[doc(alias = "gdk_content_deserialize_async")]
pub fn content_deserialize_async<
P: IsA<gio::InputStream>,
@@ -122,7 +121,7 @@ pub fn content_deserialize_future<P: IsA<gio::InputStream> + Clone + 'static>(
);
}))
}
-
+/// destroy notify for @data
#[doc(alias = "gdk_content_register_deserializer")]
pub fn content_register_deserializer<
T: 'static,
@@ -182,7 +181,7 @@ pub fn content_register_deserializer<
);
}
}
-
+/// destroy notify for @data
#[doc(alias = "gdk_content_register_serializer")]
pub fn content_register_serializer<
T: 'static,
@@ -241,7 +240,7 @@ pub fn content_register_serializer<
);
}
}
-
+/// callback to call when the operation is done
#[doc(alias = "gdk_content_serialize_async")]
pub fn content_serialize_async<
P: IsA<gio::OutputStream>,