From 0691c015621b7895794d59b4fd31947641af0a9d Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Mon, 2 Sep 2013 00:00:23 -0400 Subject: [PATCH 1/2] libsyntax: Remove obsolete fixme. --- src/libsyntax/attr.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index d365c89eee73a..2ed03040fa1f3 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -319,7 +319,6 @@ pub fn require_unique_names(diagnostic: @mut span_handler, for meta in metas.iter() { let name = meta.name(); - // FIXME: How do I silence the warnings? --pcw (#2619) if !set.insert(name) { diagnostic.span_fatal(meta.span, fmt!("duplicate meta item `%s`", name)); From 462604ace114458d388ba1f14dd0fe95c25210be Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Mon, 2 Sep 2013 13:47:31 -0400 Subject: [PATCH 2/2] librustc: Check for empty crate link meta name and vers. --- src/librustc/back/link.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index 9166696694986..64fa25fde2095 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -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