File tree 1 file changed +12
-2
lines changed 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,23 @@ fn third_party_crates() -> String {
48
48
&& name. rsplit ( '.' ) . next ( ) . map ( |ext| ext. eq_ignore_ascii_case ( "rlib" ) ) == Some ( true )
49
49
{
50
50
if let Some ( old) = crates. insert ( dep, path. clone ( ) ) {
51
+ // Check which action should be done in order to remove compiled deps.
52
+ // If pre-installed version of compiler is used, `cargo clean` will do.
53
+ // Otherwise (for bootstrapped compiler), the dependencies directory
54
+ // must be removed manually.
55
+ let suggested_action = if std:: env:: var_os ( "RUSTC_BOOTSTRAP" ) . is_some ( ) {
56
+ "remove the stageN-tools directory"
57
+ } else {
58
+ "run `cargo clean`"
59
+ } ;
60
+
51
61
panic ! (
52
62
"\n ---------------------------------------------------\n \n \
53
63
Found multiple rlibs for crate `{}`: `{:?}` and `{:?}`.\n \
54
- Probably, you need to run `cargo clean` before running tests again.\n \
64
+ Probably, you need to {} before running tests again.\n \
55
65
\n For details on that error see https://github.com/rust-lang/rust-clippy/issues/7343 \
56
66
\n ---------------------------------------------------\n ",
57
- dep, old, path
67
+ dep, old, path, suggested_action
58
68
) ;
59
69
}
60
70
break ;
You can’t perform that action at this time.
0 commit comments