-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore unsupported doc tests under --no-default-features
There's no pretty way of gating doctests contingent on cfg presence/absense so this is kind of ugly. First, a doc comment `///` is converted into its equivalent `#[doc(...)]`, which is then converted into a conditional rust attribute via `#[cfg_attr(...)]`. We need two of these, one to ignore the tests if the cfg predicate isn't met and another to indicate the start of a code block and enable testing + syntax highlighting.
- Loading branch information
Showing
4 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters