diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-02-04 09:56:18 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-02-04 13:10:00 +1100 |
| commit | 2b8d3dea63f74867d512a9ff50c695512b95a6ba (patch) | |
| tree | 069c73fce7daf833eac4e9399503e96525759b16 | |
| parent | 6dcda2aaec79f499f2d515e680a67f9f4b0d2bf9 (diff) | |
| download | rust-2b8d3dea63f74867d512a9ff50c695512b95a6ba.tar.gz rust-2b8d3dea63f74867d512a9ff50c695512b95a6ba.zip | |
Remove `staticlibs` local variable.
| -rw-r--r-- | compiler/rustc_metadata/src/locator.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs index 69725b1377c..5c81917fc0a 100644 --- a/compiler/rustc_metadata/src/locator.rs +++ b/compiler/rustc_metadata/src/locator.rs @@ -385,7 +385,6 @@ impl<'a> CrateLocator<'a> { let mut candidates: FxHashMap<_, (FxHashMap<_, _>, FxHashMap<_, _>, FxHashMap<_, _>)> = Default::default(); - let mut staticlibs = vec![]; // First, find all possible candidate rlibs and dylibs purely based on // the name of the files themselves. We're trying to match against an @@ -414,7 +413,7 @@ impl<'a> CrateLocator<'a> { (&f[dylib_prefix.len()..(f.len() - dylib_suffix.len())], CrateFlavor::Dylib) } else { if f.starts_with(staticlib_prefix) && f.ends_with(staticlib_suffix) { - staticlibs.push(CrateMismatch { + self.crate_rejections.via_kind.push(CrateMismatch { path: spf.path.clone(), got: "static".to_string(), }); @@ -438,8 +437,6 @@ impl<'a> CrateLocator<'a> { } } - self.crate_rejections.via_kind.extend(staticlibs); - // We have now collected all known libraries into a set of candidates // keyed of the filename hash listed. For each filename, we also have a // list of rlibs/dylibs that apply. Here, we map each of these lists |
