mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 06:03:16 +00:00
librustc: Check for empty crate link meta name and vers.
This commit is contained in:
parent
0691c01562
commit
462604ace1
@ -607,8 +607,8 @@ pub fn build_link_meta(sess: Session,
|
||||
fn crate_meta_name(sess: Session, output: &Path, opt_name: Option<@str>)
|
||||
-> @str {
|
||||
match opt_name {
|
||||
Some(v) => v,
|
||||
None => {
|
||||
Some(v) if !v.is_empty() => v,
|
||||
_ => {
|
||||
// to_managed could go away if there was a version of
|
||||
// filestem that returned an @str
|
||||
let name = session::expect(sess,
|
||||
@ -624,8 +624,8 @@ pub fn build_link_meta(sess: Session,
|
||||
|
||||
fn crate_meta_vers(sess: Session, opt_vers: Option<@str>) -> @str {
|
||||
match opt_vers {
|
||||
Some(v) => v,
|
||||
None => {
|
||||
Some(v) if !v.is_empty() => v,
|
||||
_ => {
|
||||
let vers = @"0.0";
|
||||
warn_missing(sess, "vers", vers);
|
||||
vers
|
||||
|
Loading…
Reference in New Issue
Block a user