domain icon indicating copy to clipboard operation
domain copied to clipboard

Only compile doc tests that require non-default features if those features are enabled.

Open ximon18 opened this issue 6 months ago • 1 comments

Thanks to https://users.rust-lang.org/t/doctests-that-require-a-non-default-feature-is-it-possible/29529/4

ximon18 avatar Jun 25 '25 10:06 ximon18

I'm not sure this is the best way to do it, because this will remove examples from the documentation entirely, increasing confusion. This wouldn't be an issue for docs.rs, but the use case of building documentation locally (with limited feature flags) is important to me. Perhaps these examples should just be moved to the common module, where no cfg magic will be necessary.

bal-e avatar Jun 25 '25 15:06 bal-e