Always wondered how to keep your README (or other markdown files) code examples up-to-date in your @rustlang project? You might be interested by https://blog.guillaume-gomez.fr/articles/2019-04-13+Keeping+Rust+projects%27+README.md+code+examples+up-to-date …
Could you use `#[cfg(rustdoc)]` instead? But maybe that won't pick up dev-dependencies..?
-
-
It won't indeed, which is a bit unfortunate... Also, using `#[cfg(rustdoc)]` would be pretty useless considering that this macro is only used by rustdoc. That might avoid `include_str!` to be called when something else than rustdoc runs but not sure the gain is really worth it...
-
Yeah mostly I'm just looking for a way to do this without adding a doc-comment dependency that must be inherited by all dependents.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.