From c0a87d0a1fca4625dd6fcfe3e722e24214fd840e Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 18 Dec 2022 08:59:04 -0800 Subject: [PATCH] Opt out -Zrustdoc-scrape-examples on docs.rs I'd like a chance to audit all the code that rustdoc is inserting into the docs. Currently I am skeptical that showing anyhow's internal usages of APIs is a net benefit to the public documentation. I am also skeptical that quite so many examples are needed, and that they should be featured so prominently in comparison to handwritten docs. Lastly I wish there were a way to turn this behavior off on a more granular basis. --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 7a8a25f..4a31bf0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,9 @@ syn = { version = "1.0", features = ["full"] } thiserror = "1.0" trybuild = { version = "1.0.66", features = ["diff"] } +[lib] +doc-scrape-examples = false + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "doc_cfg"]