Skip to content

Commit d7fbd15

Browse files
committed
tests: remove use of doc_comment crate
It relies on `cfg(doctest)`, which wasn't stabilized until Rust 1.43. Interestingly, it compiled on Rust 1.28, but didn't compile on, e.g., Rust 1.39. This breaks our MSRV policy, so we unfortunately remove the use of doc_comment for now. It's likely possible to conditionally enable it, but the extra build script required to do version sniffing to do it doesn't seem worth it. Fixes #684, Fixes #685
1 parent e005346 commit d7fbd15

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
1.3.9 (2020-05-28)
2+
==================
3+
This release fixes a MSRV (Minimum Support Rust Version) regression in the
4+
1.3.8 release. Namely, while 1.3.8 compiles on Rust 1.28, it actually does not
5+
compile on other Rust versions, such as Rust 1.39.
6+
7+
Bug fixes:
8+
9+
* [BUG #685](https://github.com/rust-lang/regex/issue/685):
10+
Remove use of `doc_comment` crate, which cannot be used before Rust 1.43.
11+
12+
113
1.3.8 (2020-05-28)
214
==================
315
This release contains a couple of important bug fixes driven

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ quickcheck = { version = "0.8", default-features = false }
129129
# For generating random test data.
130130
rand = "0.6.5"
131131
# To check README's example
132-
doc-comment = "0.3"
132+
# TODO: Re-enable this once the MSRV is 1.43 or greater.
133+
# See: https://github.com/rust-lang/regex/issues/684
134+
# See: https://github.com/rust-lang/regex/issues/685
135+
# doc-comment = "0.3"
133136

134137
# Run the test suite on the default behavior of Regex::new.
135138
# This includes a mish mash of NFAs and DFAs, which are chosen automatically

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,8 @@ compile_error!("`std` feature is currently required to build this crate");
622622

623623
#[cfg(feature = "perf-literal")]
624624
extern crate aho_corasick;
625-
#[cfg(doctest)]
626-
extern crate doc_comment;
625+
// #[cfg(doctest)]
626+
// extern crate doc_comment;
627627
#[cfg(feature = "perf-literal")]
628628
extern crate memchr;
629629
#[cfg(test)]
@@ -633,8 +633,8 @@ extern crate regex_syntax as syntax;
633633
#[cfg(feature = "perf-cache")]
634634
extern crate thread_local;
635635

636-
#[cfg(doctest)]
637-
doc_comment::doctest!("../README.md");
636+
// #[cfg(doctest)]
637+
// doc_comment::doctest!("../README.md");
638638

639639
#[cfg(feature = "std")]
640640
pub use error::Error;

0 commit comments

Comments
 (0)