Skip to content

Commit e2cb94a

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. The same problem occurred with the regex crate: rust-lang/regex@d7fbd15 Fixes #62
1 parent 6cb8eb0 commit e2cb94a

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎Cargo.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ std = ["memchr/use_std"]
3535
memchr = { version = "2.2.0", default-features = false }
3636

3737
[dev-dependencies]
38+
# TODO: Re-enable this once the MSRV is 1.43 or greater.
39+
# See: https://github.com/BurntSushi/aho-corasick/issues/62
3840
doc-comment = "0.3.1"
3941

4042
[profile.release]

‎src/lib.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ disabled via
187187
compile_error!("`std` feature is currently required to build this crate");
188188

189189
extern crate memchr;
190-
#[cfg(doctest)]
191-
#[macro_use]
192-
extern crate doc_comment;
190+
// #[cfg(doctest)]
191+
// #[macro_use]
192+
// extern crate doc_comment;
193193

194-
#[cfg(doctest)]
195-
doctest!("../README.md");
194+
// #[cfg(doctest)]
195+
// doctest!("../README.md");
196196

197197
pub use ahocorasick::{
198198
AhoCorasick, AhoCorasickBuilder, FindIter, FindOverlappingIter, MatchKind,

0 commit comments

Comments
 (0)