Open
Description
It's surprising that doctests sometimes don't run at all, and there's no warning about this.
cargo new foo --bin
/// ```rust
/// assert!(false);
/// ```
fn main() {
println!("Hello, world!");
}
cargo test --all
I'd expect the above to fail, but it looks like the doc-comment code is never ran. Even if I explicitly enable doctests for the binary:
[[bin]]
name = "foo"
path = "src/main.rs"
doctest = true
they still aren't run.
(moved from rust-lang/cargo#5477)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status