Closed
Description
Problem
If a crate has
[lib]
test = false
in its Cargo.toml and you run cargo check --tests
the crate always compiles regardless of what errors might actually be there.
I would expect --tests
to still fail to compile or at least emit a clear warning.
Steps
- Made a little reproduction repo:
git clone https://github.com/davidpdrsn/cargo-bug
cd cargo-bug
cargo check --tests
compilescargo check
does not compile
Notes
Output of cargo version
: cargo 1.52.0 (69767412a 2021-04-21)