Skip to content

Commit

Permalink
tests: replace "cfg(test)" with "cfg(doctest)" for readme testing
Browse files Browse the repository at this point in the history
rustdoc now passes "doctest" when running in test mode.

PR #673.
  • Loading branch information
GuillaumeGomez committed May 7, 2020
1 parent a140b54 commit f98eea5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ compile_error!("`std` feature is currently required to build this crate");

#[cfg(feature = "perf-literal")]
extern crate aho_corasick;
#[cfg(test)]
#[cfg(doctest)]
extern crate doc_comment;
#[cfg(feature = "perf-literal")]
extern crate memchr;
Expand All @@ -633,7 +633,7 @@ extern crate regex_syntax as syntax;
#[cfg(feature = "perf-cache")]
extern crate thread_local;

#[cfg(test)]
#[cfg(doctest)]
doc_comment::doctest!("../README.md");

#[cfg(feature = "std")]
Expand Down

0 comments on commit f98eea5

Please sign in to comment.