mirror of
https://github.com/rust-lang/cargo
synced 2024-10-30 03:28:38 +00:00
Add detail to multiple rename deps
This commit is contained in:
parent
2458180760
commit
53a0995b4b
3 changed files with 7 additions and 11 deletions
|
@ -28,7 +28,7 @@ curl = { version = "0.4.19", features = ['http2'] }
|
||||||
curl-sys = "0.4.15"
|
curl-sys = "0.4.15"
|
||||||
env_logger = "0.6.0"
|
env_logger = "0.6.0"
|
||||||
pretty_env_logger = { version = "0.3", optional = true }
|
pretty_env_logger = { version = "0.3", optional = true }
|
||||||
failure = "0.1.2"
|
failure = "0.1.5"
|
||||||
filetime = "0.2"
|
filetime = "0.2"
|
||||||
flate2 = { version = "1.0.3", features = ['zlib'] }
|
flate2 = { version = "1.0.3", features = ['zlib'] }
|
||||||
fs2 = "0.4"
|
fs2 = "0.4"
|
||||||
|
|
|
@ -240,14 +240,11 @@ unable to verify that `{0}` is the same as when the lockfile was generated
|
||||||
});
|
});
|
||||||
let name = names.next().unwrap_or_else(|| crate_name.clone());
|
let name = names.next().unwrap_or_else(|| crate_name.clone());
|
||||||
for n in names {
|
for n in names {
|
||||||
if n == name {
|
failure::ensure!(
|
||||||
continue;
|
n == name,
|
||||||
}
|
"the crate `{}` depends on crate `{}` multiple times with different names",
|
||||||
failure::bail!(
|
from,
|
||||||
"multiple dependencies listed for the same crate must \
|
to,
|
||||||
all have the same name, but the dependency on `{}` \
|
|
||||||
is listed as having different names",
|
|
||||||
to
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Ok(name)
|
Ok(name)
|
||||||
|
|
|
@ -186,8 +186,7 @@ fn rename_twice() {
|
||||||
[UPDATING] `[..]` index
|
[UPDATING] `[..]` index
|
||||||
[DOWNLOADING] crates ...
|
[DOWNLOADING] crates ...
|
||||||
[DOWNLOADED] foo v0.1.0 (registry [..])
|
[DOWNLOADED] foo v0.1.0 (registry [..])
|
||||||
error: multiple dependencies listed for the same crate must all have the same \
|
error: the crate `test v0.1.0 ([CWD])` depends on crate `foo v0.1.0` multiple times with different names
|
||||||
name, but the dependency on `foo v0.1.0` is listed as having different names
|
|
||||||
",
|
",
|
||||||
)
|
)
|
||||||
.run();
|
.run();
|
||||||
|
|
Loading…
Reference in a new issue