Open
Description
This is a tracking issue for the RFC "Scrape code examples from examples/
directory for Rustdoc" (rust-lang/rfcs#3123).
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implement the RFC (Scrape code examples from examples/ directory for Rustdoc #85833 and Scrape code examples from examples/ directory for Rustdoc cargo#9525)
- Allow users to (unstably) enable on docs.rs (no changes needed)
- Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
- Is showing 1 example by default the best idea? Or should scraped examples be hidden by default?
- Is the ability to see the full file context worth the increase in page size?
- How should the examples be ordered? Is there a way to determine the "best" examples to show first?