From d7fbd158f7e62e9319fcc254bde43b954511a669 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Thu, 28 May 2020 20:13:13 -0400 Subject: [PATCH] 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 --- CHANGELOG.md | 12 ++++++++++++ Cargo.toml | 5 ++++- src/lib.rs | 8 ++++---- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a016e74193..c7e528d5a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +1.3.9 (2020-05-28) +================== +This release fixes a MSRV (Minimum Support Rust Version) regression in the +1.3.8 release. Namely, while 1.3.8 compiles on Rust 1.28, it actually does not +compile on other Rust versions, such as Rust 1.39. + +Bug fixes: + +* [BUG #685](https://github.com/rust-lang/regex/issue/685): + Remove use of `doc_comment` crate, which cannot be used before Rust 1.43. + + 1.3.8 (2020-05-28) ================== This release contains a couple of important bug fixes driven diff --git a/Cargo.toml b/Cargo.toml index 8998cff0c3..fdc8e0fc56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -129,7 +129,10 @@ quickcheck = { version = "0.8", default-features = false } # For generating random test data. rand = "0.6.5" # To check README's example -doc-comment = "0.3" +# TODO: Re-enable this once the MSRV is 1.43 or greater. +# See: https://github.com/rust-lang/regex/issues/684 +# See: https://github.com/rust-lang/regex/issues/685 +# doc-comment = "0.3" # Run the test suite on the default behavior of Regex::new. # This includes a mish mash of NFAs and DFAs, which are chosen automatically diff --git a/src/lib.rs b/src/lib.rs index 03a2ed69e3..e0a0975f52 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -622,8 +622,8 @@ compile_error!("`std` feature is currently required to build this crate"); #[cfg(feature = "perf-literal")] extern crate aho_corasick; -#[cfg(doctest)] -extern crate doc_comment; +// #[cfg(doctest)] +// extern crate doc_comment; #[cfg(feature = "perf-literal")] extern crate memchr; #[cfg(test)] @@ -633,8 +633,8 @@ extern crate regex_syntax as syntax; #[cfg(feature = "perf-cache")] extern crate thread_local; -#[cfg(doctest)] -doc_comment::doctest!("../README.md"); +// #[cfg(doctest)] +// doc_comment::doctest!("../README.md"); #[cfg(feature = "std")] pub use error::Error;