Should rustdoc include cargo examples?

just want to mention, it is supported on https://docs.rs too! this is a really useful documenting feature. I hope more crates will utilize this feature. to enable this feature on docs.rs, you add the following metadata section to your Cargo.toml manifest:

[package.metadata.docs.rs]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]

here's an example how it looks on docs.rs:

4 Likes