From 125ca27011ad74b4c1499f8a79e7de14d47dce40 Mon Sep 17 00:00:00 2001 From: bouzuya Date: Thu, 27 Oct 2022 21:29:22 +0900 Subject: [PATCH 1/2] fix disable_comments comment --- prost-build/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prost-build/src/lib.rs b/prost-build/src/lib.rs index 55442942f..6cf25ecff 100644 --- a/prost-build/src/lib.rs +++ b/prost-build/src/lib.rs @@ -490,7 +490,7 @@ impl Config { /// /// ```rust,ignore /// let mut config = prost_build::Config::new(); - /// config.disable_comments("."); + /// config.disable_comments(&["."]); /// config.compile_protos(&["src/frontend.proto", "src/backend.proto"], &["src"])?; /// ``` /// From 604847ddd80df255724a4246ba1692a62a83c505 Mon Sep 17 00:00:00 2001 From: bouzuya Date: Fri, 28 Oct 2022 22:14:30 +0900 Subject: [PATCH 2/2] fix to use no_run instead of ignore --- prost-build/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/prost-build/src/lib.rs b/prost-build/src/lib.rs index 6cf25ecff..e89c1be29 100644 --- a/prost-build/src/lib.rs +++ b/prost-build/src/lib.rs @@ -488,10 +488,13 @@ impl Config { /// disable doctests for the crate with a [Cargo.toml entry][2]. If neither of these options /// are possible, then omit comments on generated code during doctest builds: /// - /// ```rust,ignore + /// ```rust,no_run + /// # fn main() -> std::io::Result<()> { /// let mut config = prost_build::Config::new(); /// config.disable_comments(&["."]); /// config.compile_protos(&["src/frontend.proto", "src/backend.proto"], &["src"])?; + /// # Ok(()) + /// # } /// ``` /// /// As with other options which take a set of paths, comments can be disabled on a per-package