It seems that the test feature requirement for the doctest!() macro currently disables the validation of the tests cases inside the README.md file. https://github.com/Geal/nom/blob/f40e4a74bd25abea2d2de306476c143dd0e9a181/src/lib.rs#L425-L426 I assume that the reason here is rustdoc not using the test flag (https://github.com/rust-lang/rust/pull/61199). So this will not work until https://github.com/rust-lang/rust/pull/61351 and https://github.com/rust-lang/rust/pull/62213 are merged and we change the l.425 into `#[cfg(doctest)]`.