File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 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 {
4848 && name. rsplit ( '.' ) . next ( ) . map ( |ext| ext. eq_ignore_ascii_case ( "rlib" ) ) == Some ( true )
4949 {
5050 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+
5161 panic ! (
5262 "\n ---------------------------------------------------\n \n \
5363 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 \
5565 \n For details on that error see https://github.com/rust-lang/rust-clippy/issues/7343 \
5666 \n ---------------------------------------------------\n ",
57- dep, old, path
67+ dep, old, path, suggested_action
5868 ) ;
5969 }
6070 break ;
You can’t perform that action at this time.
0 commit comments