From 58ced1635b6c7766b18d47af45bcd484af578ab5 Mon Sep 17 00:00:00 2001 From: Paul Fanelli Date: Sun, 28 Aug 2016 00:38:04 +0000 Subject: [PATCH] Update E0463 error message to new format --- src/librustc_metadata/loader.rs | 8 +++++--- src/test/compile-fail/E0463.rs | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/librustc_metadata/loader.rs b/src/librustc_metadata/loader.rs index b2c87db8ef566..44d7861066da3 100644 --- a/src/librustc_metadata/loader.rs +++ b/src/librustc_metadata/loader.rs @@ -342,9 +342,11 @@ impl<'a> Context<'a> { "found crate `{}` compiled by an incompatible version of rustc{}", self.ident, add) } else { - struct_span_err!(self.sess, self.span, E0463, - "can't find crate for `{}`{}", - self.ident, add) + let mut err = struct_span_err!(self.sess, self.span, E0463, + "can't find crate for `{}`{}", + self.ident, add); + err.span_label(self.span, &format!("can't find crate")); + err }; if !self.rejected_via_triple.is_empty() { diff --git a/src/test/compile-fail/E0463.rs b/src/test/compile-fail/E0463.rs index 3eff107365af1..3ce5b83e89fd4 100644 --- a/src/test/compile-fail/E0463.rs +++ b/src/test/compile-fail/E0463.rs @@ -9,7 +9,9 @@ // except according to those terms. #![feature(plugin)] -#![plugin(cookie_monster)] //~ ERROR E0463 +#![plugin(cookie_monster)] +//~^ ERROR E0463 +//~| NOTE can't find crate extern crate cake_is_a_lie; fn main() {