Description
When writing module-level or other high-level documentation, I often want to link to our examples to show users how to do something in more detail. See bevyengine/bevy#15056 for an example of this problem.
This is distinct from the automatically generated links to examples, rustdoc-scrape-examples
, (which are great!): we want to be able to manually link to specific examples.
@GuillaumeGomez pointed out that this can be done in part using relative paths, e.g. ../../src/custom_loop/custom_loop.rs.html#19
. However, this is very fragile: any change to either file breaks the link with no tooling to detect the breakage. This functionality is also undocumented, and could be broken by rustdoc / docs.rs at any time.
To add full support, he thinks we might need an intra-doc link extension to make it work.