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() {