about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIgor Aleksanov <popzxc@yandex.ru>2021-06-20 08:25:30 +0300
committerIgor Aleksanov <popzxc@yandex.ru>2021-06-20 08:25:30 +0300
commitd4c9fe7549f29ca573f5a58ac94eacd662cd1421 (patch)
tree5a08cf3159d2cef9a7097bdda43c5226c40bbccd
parent3120b09151242a2aaf3f5fdf36e6f98e5f6236cc (diff)
downloadrust-d4c9fe7549f29ca573f5a58ac94eacd662cd1421.tar.gz
rust-d4c9fe7549f29ca573f5a58ac94eacd662cd1421.zip
Improve visibility&helpfulness of the 'found multiple rlibs' error
-rw-r--r--tests/compile-test.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/compile-test.rs b/tests/compile-test.rs
index 7d266a36bb6..72905bd948e 100644
--- a/tests/compile-test.rs
+++ b/tests/compile-test.rs
@@ -48,7 +48,13 @@ fn third_party_crates() -> String {
                     && name.rsplit('.').next().map(|ext| ext.eq_ignore_ascii_case("rlib")) == Some(true)
                 {
                     if let Some(old) = crates.insert(dep, path.clone()) {
-                        panic!("Found multiple rlibs for crate `{}`: `{:?}` and `{:?}", dep, old, path);
+                        panic!(
+                            "\n---------------------------------------------------\n\n \
+                            Found multiple rlibs for crate `{}`: `{:?}` and `{:?}`.\n \
+                            Probably, you need to run `cargo clean` before running tests again.\n \
+                            \n---------------------------------------------------\n",
+                            dep, old, path
+                        );
                     }
                     break;
                 }