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 serde'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.
This commit is contained in:
David Tolnay 2022-12-18 09:31:16 -08:00
parent 44bf3633af
commit 5d186c77a6
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,9 @@ serde_derive = { version = "=1.0.151", optional = true, path = "../serde_derive"
[dev-dependencies] [dev-dependencies]
serde_derive = { version = "1.0", path = "../serde_derive" } serde_derive = { version = "1.0", path = "../serde_derive" }
[lib]
doc-scrape-examples = false
[package.metadata.playground] [package.metadata.playground]
features = ["derive", "rc"] features = ["derive", "rc"]

View File

@ -21,5 +21,8 @@ serde = { version = "1.0.60", path = "../serde" }
serde = { version = "1.0", path = "../serde" } serde = { version = "1.0", path = "../serde" }
serde_derive = { version = "1.0", path = "../serde_derive" } serde_derive = { version = "1.0", path = "../serde_derive" }
[lib]
doc-scrape-examples = false
[package.metadata.docs.rs] [package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"] targets = ["x86_64-unknown-linux-gnu"]