Skip to content

Commit 36835b7

Browse files
committed
Check for rmeta crates when getting existing crates from cache
1 parent 84864bf commit 36835b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/rustc_metadata/src/creader.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,9 @@ impl<'a> CrateLoader<'a> {
253253
if let Some(mut files) = entry.files() {
254254
if files.any(|l| {
255255
let l = fs::canonicalize(l).unwrap_or(l.clone().into());
256-
source.dylib.as_ref().map(|p| &p.0) == Some(&l)
257-
|| source.rlib.as_ref().map(|p| &p.0) == Some(&l)
256+
source.dylib.as_ref().map(|(p, _)| p) == Some(&l)
257+
|| source.rlib.as_ref().map(|(p, _)| p) == Some(&l)
258+
|| source.rmeta.as_ref().map(|(p, _)| p) == Some(&l)
258259
}) {
259260
ret = Some(cnum);
260261
}

0 commit comments

Comments
 (0)