From 08222480e9232cc25f7884afe11264aeed0fc486 Mon Sep 17 00:00:00 2001 From: mitaa Date: Thu, 24 Dec 2015 08:15:58 +0100 Subject: [PATCH 1/2] Fix link to `Formatter::debug_struct` --- src/libcore/fmt/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 04676c0c9c8b4..628bf654873c7 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -356,7 +356,7 @@ impl<'a> Display for Arguments<'a> { /// `Debug` implementations using either `derive` or the debug builder API /// on `Formatter` support pretty printing using the alternate flag: `{:#?}`. /// -/// [debug_struct]: ../std/fmt/struct.Formatter.html#method.debug_struct +/// [debug_struct]: ../../std/fmt/struct.Formatter.html#method.debug_struct /// /// Pretty printing with `#?`: /// From 992feab697ee51d9bd89e693c5106c6cbf0b0a12 Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Tue, 29 Dec 2015 00:11:52 -0500 Subject: [PATCH 2/2] 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. --- src/librustc_metadata/loader.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustc_metadata/loader.rs b/src/librustc_metadata/loader.rs index 81788e08c7ef2..d1892b87f8bcc 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 });