You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo new a
cargo new a/b
echo'b = {path = "./b"}'>>a/Cargo.toml
echo'[dev-dependencies]'>>a/b/Cargo.toml
echo'matches = "*"'>>a/b/Cargo.toml
echo'#[cfg(test)] extern crate matches;'>>a/b/src/lib.rs
(cd a && cargo test -v -p b)
rm -r a
Output with cargo 0.11.0-nightly (6151a85 2016-04-25):
Compiling b v0.1.0(file:///tmp/aaa/a/b)Running `rustc b/src/lib.rs --crate-name b --crate-type lib -g --test -C metadata=75e04c9cbb004a98 -C extra-filename=-75e04c9cbb004a98 --out-dir /tmp/aaa/a/target/debug/deps --emit=dep-info,link -L dependency=/tmp/aaa/a/target/debug/deps -L dependency=/tmp/aaa/a/target/debug/deps`
Running `rustc b/src/lib.rs --crate-name b --crate-type lib -g -C metadata=6811c2c4848be05c -C extra-filename=-6811c2c4848be05c --out-dir /tmp/aaa/a/target/debug/deps --emit=dep-info,link -L dependency=/tmp/aaa/a/target/debug/deps -L dependency=/tmp/aaa/a/target/debug/deps`
b/src/lib.rs:7:14:7:35 error:can't find crate for `matches` [E0463]
b/src/lib.rs:7#[cfg(test)]externcrate matches;
^~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error:Could not compile `b`.Caused by:Process didn't exit successfully: `rustc b/src/lib.rs --crate-name b --crate-type lib -g --test -C metadata=75e04c9cbb004a98 -C extra-filename=-75e04c9cbb004a98 --out-dir /tmp/aaa/a/target/debug/deps --emit=dep-info,link -L dependency=/tmp/aaa/a/target/debug/deps -L dependency=/tmp/aaa/a/target/debug/deps` (exit code:101)
(Using (cd a/b && cargo test -v) instead works as expected, but uses a different target directory.)
The text was updated successfully, but these errors were encountered:
Test case:
Output with cargo 0.11.0-nightly (6151a85 2016-04-25):
(Using
(cd a/b && cargo test -v)
instead works as expected, but uses a differenttarget
directory.)The text was updated successfully, but these errors were encountered: