AFAICT, any time the "bench" or "test" profile is different from "release", it is a misconfiguration. Cargo should warn whenever a "bench" or "test" profile is defined, and it should always use the "dev" or "release" profile, based on whether or not "--release" was passed.
From #cargo IRC chat today:
Test should be different from release because I don't want to spend ten minutes waiting for optimizations every time I run tests.
Test should be different from release because I don't want to spend ten minutes waiting for optimizations every time I run tests.
cargo test
should use the dev profile and cargo test --release
should use the release profile. cargo bench should always build a release build.
Ah, yes. That makes sense.
Most helpful comment
cargo test
should use the dev profile andcargo test --release
should use the release profile. cargo bench should always build a release build.