From f98eea5d9eb97e4fc9efcf31963364eb54f98610 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 7 May 2020 14:05:50 +0200 Subject: [PATCH] tests: replace "cfg(test)" with "cfg(doctest)" for readme testing rustdoc now passes "doctest" when running in test mode. PR #673. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 649995bdca..03a2ed69e3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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; @@ -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")]