Skip to content

Commit 2b8d3de

Browse files
committed
Remove staticlibs local variable.
1 parent 6dcda2a commit 2b8d3de

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/rustc_metadata/src/locator.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ impl<'a> CrateLocator<'a> {
385385

386386
let mut candidates: FxHashMap<_, (FxHashMap<_, _>, FxHashMap<_, _>, FxHashMap<_, _>)> =
387387
Default::default();
388-
let mut staticlibs = vec![];
389388

390389
// First, find all possible candidate rlibs and dylibs purely based on
391390
// the name of the files themselves. We're trying to match against an
@@ -414,7 +413,7 @@ impl<'a> CrateLocator<'a> {
414413
(&f[dylib_prefix.len()..(f.len() - dylib_suffix.len())], CrateFlavor::Dylib)
415414
} else {
416415
if f.starts_with(staticlib_prefix) && f.ends_with(staticlib_suffix) {
417-
staticlibs.push(CrateMismatch {
416+
self.crate_rejections.via_kind.push(CrateMismatch {
418417
path: spf.path.clone(),
419418
got: "static".to_string(),
420419
});
@@ -438,8 +437,6 @@ impl<'a> CrateLocator<'a> {
438437
}
439438
}
440439

441-
self.crate_rejections.via_kind.extend(staticlibs);
442-
443440
// We have now collected all known libraries into a set of candidates
444441
// keyed of the filename hash listed. For each filename, we also have a
445442
// list of rlibs/dylibs that apply. Here, we map each of these lists

0 commit comments

Comments
 (0)