Skip to content

Commit 32f1c03

Browse files
committed
Rollup merge of #30603 - cmr:extern-failure-error-message, r=Manishearth
@ubsan brought up this relatively poor error message. This adds a help message hinting when the problem actually is, and how to fix it.
2 parents ffe2be3 + 992feab commit 32f1c03

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_metadata/loader.rs

+2
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ impl<'a> Context<'a> {
664664
}
665665
sess.err(&format!("extern location for {} is of an unknown type: {}",
666666
self.crate_name, loc.display()));
667+
sess.help(&format!("file name should be lib*.rlib or {}*.{}",
668+
dylibname.0, dylibname.1));
667669
false
668670
});
669671

0 commit comments

Comments
 (0)