I have a (currently) closed-source crate. I'm trying to use the new coverage tools built into Rust 1.60 stable and I'm seeing some weird behavior when trying to run unit tests with coverage enabled.
When I run:
RUSTFLAGS="-C instrument-coverage" cargo test --all-features
I get hundreds of errors of the flavor …
error[E0463]: can't find crate for `serde_derive` which `ciborium` depends on
--> (path redacted)
|
4 | use ciborium::value::Value;
| ^^^^^^^^ can't find crate
… when it gets to the doctest portion of the test suite. (Ironically, this crate currently has no doc tests.)
If I add …
[lib]
doctest = false
… to Cargo.toml
or compile without the instrument-coverage
flag, I have no such errors.
Rust 1.60 stable, macOS 12.1 (Intel), closed-source (currently) crate.
Before I start digging in deeper, I would like to know if:
(a) Anyone else is seeing anything like this?
(b) Would it help the Rust core team if I could find a publicly-visible repro case?