Open
Description
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 unexpected 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 form …
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?
Meta
rustc --version --verbose
:
rustc 1.60.0 (7737e0b5c 2022-04-04)
binary: rustc
commit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c
commit-date: 2022-04-04
host: x86_64-apple-darwin
release: 1.60.0
LLVM version: 14.0.0
Metadata
Metadata
Assignees
Labels
Area: Source-based code coverage (-Cinstrument-coverage)Area: Documentation tests, run by rustdocCategory: This is a bug.Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleMedium priorityRelevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Status
No status