diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index 64fa25fde20..6422290eec5 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -616,6 +616,10 @@ pub fn build_link_meta(sess: Session, || fmt!("output file name `%s` doesn't\ appear to have a stem", output.to_str())).to_managed(); + if name.is_empty() { + sess.fatal("missing crate link meta `name`, and the \ + inferred name is blank"); + } warn_missing(sess, "name", name); name }