You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The link you shared seems interesting, but not very useful to the problem I had: rustdoc needs some Rust item to attach the docs to, e.g. a trait. But because these are only derives, for traits that I don't own, I was unable to attach them anywhere.
It's definitely been a 3+ years since I looked into this though. So if you know some useful trick, I'd love to know about it. I definitely would like to have the docs fully on docs.rs
rustdoc needs some Rust item to attach the docs to
Derive macros are items. Rustdoc puts them in the rendered documentation, the only reason they're not there for derive_more is this crate has intentionally hidden them.
- embed external docs via `#[doc = include_str!(...)]`
- preserve `README.md` links working on GitHub
- switch doc tests to 2021 Rust edition and fix formatting problems
- use `feature(doc_auto_cfg)` for badges on `docs.rs`
- remove redundant toolchain regarding Rust docs generation from external files
I saw that derive_more has been doing its own thing on jeltef.github.io since at least March 2021, and the docs at https://docs.rs/derive_more/0.99.17 do not include any of the content from https://github.com/JelteF/derive_more/tree/v0.99.17/doc.
Since Rust 1.54 (July 2021) rustdoc knows how to include external markdown files as docs. See https://blog.rust-lang.org/2021/07/29/Rust-1.54.0.html#attributes-can-invoke-function-like-macros. Could you consider whether this means the bespoke website can be dropped in favor of docs.rs at this point?
The text was updated successfully, but these errors were encountered: