Hmmm. I've run into this when trying to provide a tested example for an optional feature; it would be lovely if a specific doctest could be tagged with a feature (set) somehow. I don't think there's any such option currently, but it would make a good feature request.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| How to enable a feature flag in a doc test? | 6 | 459 | November 23, 2024 | |
| How to test a package.metadata.docs.rs setting? | 4 | 1358 | April 6, 2021 | |
| How to document optional features in API docs | 5 | 3359 | December 8, 2021 | |
| Render documentation on code behind #[cfg(test)]? | 3 | 598 | January 12, 2023 | |
| Tests for documentation output? | 8 | 509 | April 15, 2023 |