Conversation
I think I got them all...
|
(forgot some intra-doc links, somehow. will fix.) |
|
I'm a bit torn on including scraped examples in our docs, because I would prefer emphasizing bespoke examples in each docstring instead. For many of the simpler generators, scraped examples are a distraction. I do think this is a net positive though. |
I think I got them all...
2af502b to
7a1661c
Compare
|
|
||
| # Required for rustdoc to know that we're okay with building examples. | ||
| [[example]] | ||
| name = "stack" | ||
| doc-scrape-examples = true | ||
|
|
||
| [dependencies] |
There was a problem hiding this comment.
this is listing just one of the examples, stack.rs. Is it still going to scrape all of the other example files?
There was a problem hiding this comment.
I don't see the requirement that we list [[examples]] in cargo.toml mentioned in the docs: https://doc.rust-lang.org/rustdoc/scraped-examples.html
Cargo seems to autodiscover the examples fine:
~/Desktop/Liam/coding/hegel/rust λ cargo build --example
error: "--example" takes one argument.
Available examples:
die_hard
ledger
min_stack
stack
~/Desktop/Liam/coding/hegel/rust λ
There was a problem hiding this comment.
I went down this rabbit hole, and it is required, but for a more specific reason than the comment implied. Here's the docs page that convinced me: https://doc.rust-lang.org/cargo/reference/unstable.html#scrape-examples
|
|
||
| #[cfg(feature = "rand")] | ||
| #[cfg_attr(docsrs, doc(cfg(feature = "rand")))] | ||
| pub use random::{HegelRandom, RandomsGenerator, randoms}; |
There was a problem hiding this comment.
I confirmed this removal is correct, but only on nightly: rust-lang/rust#43781. docs-rs builds on nightly so this is fine
No description provided.