about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authordylan_DPC <dylan.dpc@gmail.com>2019-01-04 12:37:27 +0530
committerdylan_DPC <dylan.dpc@gmail.com>2019-01-08 00:17:03 +0530
commit1ef99f1353b5cb2e2a4c4fe316d9869c4834888b (patch)
treeab6683e6387f78104c3ebc67e56cf717dd585193 /src/libsyntax
parent21ac19d8fefb023752645fcf2517ce0fad663bf0 (diff)
downloadrust-1ef99f1353b5cb2e2a4c4fe316d9869c4834888b.tar.gz
rust-1ef99f1353b5cb2e2a4c4fe316d9869c4834888b.zip
stabilise cfg_attr
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/config.rs22
-rw-r--r--src/libsyntax/feature_gate.rs5
2 files changed, 4 insertions, 23 deletions
diff --git a/src/libsyntax/config.rs b/src/libsyntax/config.rs
index 9eebbedc0bc..cf5ae4e7630 100644
--- a/src/libsyntax/config.rs
+++ b/src/libsyntax/config.rs
@@ -94,11 +94,6 @@ impl<'a> StripUnconfigured<'a> {
             return vec![attr];
         }
 
-        let gate_cfg_attr_multi = if let Some(ref features) = self.features {
-            !features.cfg_attr_multi
-        } else {
-            false
-        };
         let cfg_attr_span = attr.span;
 
         let (cfg_predicate, expanded_attrs) = match attr.parse(self.sess, |parser| {
@@ -130,21 +125,8 @@ impl<'a> StripUnconfigured<'a> {
         // Check feature gate and lint on zero attributes in source. Even if the feature is gated,
         // we still compute as if it wasn't, since the emitted error will stop compilation further
         // along the compilation.
-        match (expanded_attrs.len(), gate_cfg_attr_multi) {
-            (0, false) => {
-                // FIXME: Emit unused attribute lint here.
-            },
-            (1, _) => {},
-            (_, true) => {
-                emit_feature_err(
-                    self.sess,
-                    "cfg_attr_multi",
-                    cfg_attr_span,
-                    GateIssue::Language,
-                    "cfg_attr with zero or more than one attributes is experimental",
-                );
-            },
-            (_, false) => {}
+        if expanded_attrs.len() == 0 {
+            // FIXME: Emit unused attribute lint here.
         }
 
         if attr::cfg_matches(&cfg_predicate, self.sess, self.features) {
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index cca2702f1a7..c900bb916f4 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -465,9 +465,6 @@ declare_features! (
     // Allows `impl Trait` in bindings (`let`, `const`, `static`).
     (active, impl_trait_in_bindings, "1.30.0", Some(34511), None),
 
-    // `#[cfg_attr(predicate, multiple, attributes, here)]`
-    (active, cfg_attr_multi, "1.31.0", Some(54881), None),
-
     // Allows `const _: TYPE = VALUE`.
     (active, underscore_const_names, "1.31.0", Some(54912), None),
 
@@ -689,6 +686,8 @@ declare_features! (
     (accepted, repr_packed, "1.33.0", Some(33158), None),
     // Allows calling `const unsafe fn` inside `unsafe` blocks in `const fn` functions.
     (accepted, min_const_unsafe_fn, "1.33.0", Some(55607), None),
+// `#[cfg_attr(predicate, multiple, attributes, here)]`
+    (accepted, cfg_attr_multi, "1.33.0", Some(54881), None),
 );
 
 // If you change this, please modify `src/doc/unstable-book` as well. You must