summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-01 09:22:15 +0000
committerbors <bors@rust-lang.org>2014-10-01 09:22:15 +0000
commitff2616e847ddf913e007d715732b5669b0f22672 (patch)
treee279e0568b2bc92c8f99d01a02a45a3a1fe040ee /src/libsyntax
parent60e7317345f246a8169bbfe721473f693d54cade (diff)
parentb4909f6eb713b51c73010e888053a1aed7b8fb64 (diff)
downloadrust-ff2616e847ddf913e007d715732b5669b0f22672.tar.gz
rust-ff2616e847ddf913e007d715732b5669b0f22672.zip
auto merge of #17630 : sfackler/rust/cfg-warnings, r=brson
Closes #17490
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/attr.rs3
-rw-r--r--src/libsyntax/config.rs3
-rw-r--r--src/libsyntax/ext/cfg.rs3
3 files changed, 0 insertions, 9 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs
index 8963185192a..1491f02b3f5 100644
--- a/src/libsyntax/attr.rs
+++ b/src/libsyntax/attr.rs
@@ -315,14 +315,11 @@ pub fn cfg_matches(diagnostic: &SpanHandler, cfgs: &[P<MetaItem>], cfg: &ast::Me
         ast::MetaList(ref pred, ref mis) if pred.get() == "all" =>
             mis.iter().all(|mi| cfg_matches(diagnostic, cfgs, &**mi)),
         ast::MetaList(ref pred, ref mis) if pred.get() == "not" => {
-            // NOTE: turn on after snapshot
-            /*
             if mis.len() != 1 {
                 diagnostic.span_warn(cfg.span, "the use of multiple cfgs in the same `not` \
                                                 statement is deprecated. Change `not(a, b)` to \
                                                 `not(all(a, b))`.");
             }
-            */
             !mis.iter().all(|mi| cfg_matches(diagnostic, cfgs, &**mi))
         }
         ast::MetaList(ref pred, _) => {
diff --git a/src/libsyntax/config.rs b/src/libsyntax/config.rs
index 41b7218da0c..9b4748f88ab 100644
--- a/src/libsyntax/config.rs
+++ b/src/libsyntax/config.rs
@@ -260,8 +260,6 @@ fn in_cfg(diagnostic: &SpanHandler, cfg: &[P<ast::MetaItem>], attrs: &[ast::Attr
             _ => continue
         };
 
-        // NOTE: turn on after snapshot
-        /*
         if mis.len() != 1 {
             diagnostic.span_warn(attr.span, "The use of multiple cfgs in the top level of \
                                              `#[cfg(..)]` is deprecated. Change `#[cfg(a, b)]` to \
@@ -274,7 +272,6 @@ fn in_cfg(diagnostic: &SpanHandler, cfg: &[P<ast::MetaItem>], attrs: &[ast::Attr
                                              the intersection of the cfgs. Change `#[cfg(a)] \
                                              #[cfg(b)]` to `#[cfg(any(a, b))]`.");
         }
-        */
 
         seen_cfg = true;
         in_cfg |= mis.iter().all(|mi| attr::cfg_matches(diagnostic, cfg, &**mi));
diff --git a/src/libsyntax/ext/cfg.rs b/src/libsyntax/ext/cfg.rs
index 342e7e6d52e..74039da6cab 100644
--- a/src/libsyntax/ext/cfg.rs
+++ b/src/libsyntax/ext/cfg.rs
@@ -38,14 +38,11 @@ pub fn expand_cfg<'cx>(cx: &mut ExtCtxt,
         p.expect(&token::COMMA);
     }
 
-    // NOTE: turn on after snapshot
-    /*
     if cfgs.len() != 1 {
         cx.span_warn(sp, "The use of multiple cfgs at the top level of `cfg!` \
                           is deprecated. Change `cfg!(a, b)` to \
                           `cfg!(all(a, b))`.");
     }
-    */
 
     let matches_cfg = cfgs.iter().all(|cfg| attr::cfg_matches(&cx.parse_sess.span_diagnostic,
                                                               cx.cfg.as_slice(), &**cfg));