about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2015-12-29 00:11:52 -0500
committerCorey Richardson <corey@octayn.net>2015-12-29 00:25:37 -0500
commit992feab697ee51d9bd89e693c5106c6cbf0b0a12 (patch)
treeb9a8cbae16858329c45b78dd40da96907de205d1
parent27a1834ce522e3ec7fe4726b1661de16ee30c503 (diff)
Add a hint when given --extern with an indeterminate type
@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
             });