Marking a doctest code block as edition2018
causes it not to run
#65980
Labels
A-doctests
Area: Documentation tests, run by rustdoc
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
I have a fresh Rust library, started with
cargo new --lib foo
, and I have the following inlib.rs
:I can
cargo build
andcargo test
this library. The doctest is obviously never run because1 + 1 == 999
is false. The output fromcargo test
confirms this, showing that zero test were run.The doctest book lead me to believe the doctest should still work, even if marked as
edition2018
.Cargo.toml
is:The text was updated successfully, but these errors were encountered: