Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a1ea1c1

Browse files
committed
Check that library is file
1 parent 40b7e0e commit a1ea1c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_metadata/src/locator.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,12 @@ impl<'a> CrateLocator<'a> {
707707
loc.original().clone(),
708708
));
709709
}
710+
if !loc.original().is_file() {
711+
return Err(CrateError::ExternLocationNotFile(
712+
self.crate_name,
713+
loc.original().clone(),
714+
));
715+
}
710716
let Some(file) = loc.original().file_name().and_then(|s| s.to_str()) else {
711717
return Err(CrateError::ExternLocationNotFile(
712718
self.crate_name,

0 commit comments

Comments
 (0)