more helpful error on workspaces

This commit is contained in:
Ralf Jung 2020-04-30 10:19:34 +02:00
parent dc91c172a4
commit e9212d14ac

View file

@ -144,7 +144,8 @@ fn list_targets() -> impl Iterator<Item = cargo_metadata::Target> {
})
.unwrap_or_else(|| {
show_error(format!(
"This seems to be a workspace, which is not supported by cargo-miri"
"this seems to be a workspace, which is not supported by `cargo miri`.\n\
Try to `cd` into the crate you want to test, and re-run `cargo miri` there."
))
});
let package = metadata.packages.remove(package_index);