mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
Stop using old version of syn
in rustc-workspace-hack
None of the tools seem to need syn 0.15.35, so we can just build syn 1.0. This was causing an issue with clippy's `compile-test` program: since multiple versions of `syn` would exist in the build directory, we would non-deterministically pick one based on filesystem iteration order. If the pre-1.0 version of `syn` was picked, a strange build error would occur (see https://github.com/rust-lang/rust/pull/73594#issuecomment-647671463) To prevent this kind of issue from happening again, we now panic if we find multiple versions of a crate in the build directly, instead of silently picking the first version we find.
This commit is contained in:
parent
922ff8e485
commit
e11b873c70
1 changed files with 3 additions and 1 deletions
|
@ -49,7 +49,9 @@ fn third_party_crates() -> String {
|
|||
if let Some(name) = path.file_name().and_then(OsStr::to_str) {
|
||||
for dep in CRATES {
|
||||
if name.starts_with(&format!("lib{}-", dep)) && name.ends_with(".rlib") {
|
||||
crates.entry(dep).or_insert(path);
|
||||
if let Some(old) = crates.insert(dep, path.clone()) {
|
||||
panic!("Found multiple rlibs for crate `{}`: `{:?}` and `{:?}", dep, old, path);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue