Don't die with an ICE on a blank library name

Closes #5425
This commit is contained in:
Alex Crichton 2013-09-04 01:07:36 -07:00
parent 4f151b388b
commit 2c573e933b

View File

@ -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
}