about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-12-29 15:55:09 -0500
committerSteve Klabnik <steve@steveklabnik.com>2015-12-29 15:55:09 -0500
commit9ef4030692811d7bc0105c2ad514e55dc90d2109 (patch)
treeaffd73fc29f5a12bfca21d815c4421a35a14b2c2
parentbfa36c9ab88cbae88b29df724a1e66b797a21d7b (diff)
parent992feab697ee51d9bd89e693c5106c6cbf0b0a12 (diff)
downloadrust-9ef4030692811d7bc0105c2ad514e55dc90d2109.tar.gz
rust-9ef4030692811d7bc0105c2ad514e55dc90d2109.zip
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.
-rw-r--r--src/librustc_metadata/loader.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_metadata/loader.rs b/src/librustc_metadata/loader.rs
index 81788e08c7e..d1892b87f8b 100644
--- a/src/librustc_metadata/loader.rs
+++ b/src/librustc_metadata/loader.rs
@@ -664,6 +664,8 @@ impl<'a> Context<'a> {
                 }
                 sess.err(&format!("extern location for {} is of an unknown type: {}",
                                  self.crate_name, loc.display()));
+                sess.help(&format!("file name should be lib*.rlib or {}*.{}",
+                                   dylibname.0, dylibname.1));
                 false
             });