-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit 477e5b5
Rustdoc: Scrape examples (#9154)
# Objective
Provide more usage examples in API docs so that people can see methods
being used in context.
## Solution
Enable experimental rustdoc feature "scrape examples". See
<https://doc.rust-lang.org/nightly/rustdoc/scraped-examples.html> for
official docs.
## Example screenshots of examples :)
<img width="1013" alt="image"
src="https://github.com/bevyengine/bevy/assets/20063/7abc8baa-3149-476f-b2f2-ce7693758bee">
<img width="1033" alt="image"
src="https://github.com/bevyengine/bevy/assets/20063/163e7e22-c55e-46ab-8f3d-75fb97c3ad7a">
<img width="1009" alt="image"
src="https://github.com/bevyengine/bevy/assets/20063/a50b1147-e252-43f3-9adb-81960b8aa6c3">
## Limitations
- Only methods seem to show examples so far
- It may be confusing to have curated examples from doc comments
followed by snippets from `examples/`
---------
Co-authored-by: Carter Anderson <[email protected]>1 parent 9d1a102 commit 477e5b5Copy full SHA for 477e5b5
File tree
Expand file treeCollapse file tree
1 file changed
+184
-0
lines changedFilter options
Expand file treeCollapse file tree
1 file changed
+184
-0
lines changed
0 commit comments