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 <mcanders1@gmail.com>
This commit is contained in:
Pascal Hertleif 2023-08-10 02:27:39 +02:00 committed by GitHub
parent 77824b96ff
commit 2cc1068983
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load diff