domain
domain copied to clipboard
Only compile doc tests that require non-default features if those features are enabled.
Thanks to https://users.rust-lang.org/t/doctests-that-require-a-non-default-feature-is-it-possible/29529/4
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.