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
I think the "manual style" of adding some code to the doc string is very good, e.g.:
/// Get value for given key.\////// # Example/// ```/// .../// ```pubfn get(&self,k:&str) -> Option<...> {
...
However sometimes it helps to see certain methods used in a wider context or more complex examples. While one can manually link examples, I think the rendering of rustdoc is great and avoiding manual maintenance burden is always a plus.
I think this greatly helps people to understand what certain methods do.
How
IIRC docs.rs uses a nightly compiler. So all we would need to do is to follow bevy.
Activity
alamb commentedon Jul 2, 2025
We currently use a more manual version of this:
datafusion/datafusion/core/src/lib.rs
Lines 867 to 898 in 25c2a07
Basically we use the
doc_commentto manually list files to include in doc testsIt would be amazing to do it automatically with rustdocs