Closed as not planned
Closed as not planned
Description
I always expect that cargo test
basically runs a cargo build
before doing anything test specific. But that's apparently not the case.
Minimal example:
Cargo.toml
[package]
name = "foo"
version = "0.1.0"
authors = ["me"]
edition = "2018"
src/lib.rs
pub fn foo() {}
tests/main.rs
use foo::foo;
#[test]
fn main() {
foo();
}
Executing cargo test
will compile the foo
crate and execute tests. Fine. BUT: cargo clean && cargo test
won't create the file target/debug/libfoo.rlib
while cargo clean && cargo build
does create that file. This is very unexpected.
Tests on rustc 1.31.0-nightly (5597ee8a6 2018-10-03)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
Done