Skip to content

Commit

Permalink
Opt out -Zrustdoc-scrape-examples on docs.rs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dtolnay committed Dec 18, 2022
1 parent 44bf363 commit 5d186c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions serde/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ serde_derive = { version = "=1.0.151", optional = true, path = "../serde_derive"
[dev-dependencies]
serde_derive = { version = "1.0", path = "../serde_derive" }

[lib]
doc-scrape-examples = false

[package.metadata.playground]
features = ["derive", "rc"]

Expand Down
3 changes: 3 additions & 0 deletions serde_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ serde = { version = "1.0.60", path = "../serde" }
serde = { version = "1.0", path = "../serde" }
serde_derive = { version = "1.0", path = "../serde_derive" }

[lib]
doc-scrape-examples = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

0 comments on commit 5d186c7

Please sign in to comment.