From 84c637d3e80110ff32f62a685a4a41027189ca18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?joseLu=C3=ADs?= Date: Sat, 8 Aug 2020 18:32:42 +0200 Subject: [PATCH] copy all comments as doc Rust comments In principle it would be better to write the comments intented for documentation as `///` (or `/** */` for multi-line), but this way it works mostly, without having to change them all. There are two comments that are not valid Rust doc-comments, and arerendered badly: The are the ones in: `ncmultiselector_options` and `ncselector_item`. --- rust/libnotcurses-sys/build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rust/libnotcurses-sys/build.rs b/rust/libnotcurses-sys/build.rs index 93aae0104..f269c20e9 100644 --- a/rust/libnotcurses-sys/build.rs +++ b/rust/libnotcurses-sys/build.rs @@ -25,6 +25,10 @@ fn main() { // The input header we would like to generate // builder for. .header("wrapper.h") + // generate comments, also from headers and not just doc comments (///) + .generate_comments(true) + .clang_arg("-fretain-comments-from-system-headers") + .clang_arg("-fparse-all-comments") // Remove warnings about improper_ctypes .blacklist_function("strtold") .blacklist_function("wcstold")