about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-22 01:32:51 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-10-03 06:46:52 +0200
commit287ceed469e11214ff2650f0aea94e94711aa401 (patch)
tree5af15396e3d8f509b503d8ebe8367e3af7f17549 /src/libsyntax/feature_gate
parent2daa404e9a151a2e8262cbd6d8c209fd067aca16 (diff)
downloadrust-287ceed469e11214ff2650f0aea94e94711aa401.tar.gz
rust-287ceed469e11214ff2650f0aea94e94711aa401.zip
Deprecate `#![plugin]` and `#[plugin_registrar]`.
Diffstat (limited to 'src/libsyntax/feature_gate')
-rw-r--r--src/libsyntax/feature_gate/builtin_attrs.rs11
-rw-r--r--src/libsyntax/feature_gate/check.rs4
2 files changed, 12 insertions, 3 deletions
diff --git a/src/libsyntax/feature_gate/builtin_attrs.rs b/src/libsyntax/feature_gate/builtin_attrs.rs
index d14afc6deaa..d1c2ffb2880 100644
--- a/src/libsyntax/feature_gate/builtin_attrs.rs
+++ b/src/libsyntax/feature_gate/builtin_attrs.rs
@@ -279,9 +279,14 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
 
     // Plugins:
     ungated!(plugin_registrar, Normal, template!(Word)),
-    gated!(
-        plugin, CrateLevel, template!(List: "name|name(args)"),
-        "compiler plugins are experimental and possibly buggy",
+    (
+        sym::plugin, CrateLevel, template!(List: "name|name(args)"),
+        Gated(
+            Stability::Deprecated("https://github.com/rust-lang/rust/issues/29597", None),
+            sym::plugin,
+            "compiler plugins are deprecated and will be removed in 1.44.0",
+            cfg_fn!(plugin)
+        )
     ),
 
     // Testing:
diff --git a/src/libsyntax/feature_gate/check.rs b/src/libsyntax/feature_gate/check.rs
index d7fc74955bb..158f12839ae 100644
--- a/src/libsyntax/feature_gate/check.rs
+++ b/src/libsyntax/feature_gate/check.rs
@@ -311,6 +311,10 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
                 if attr::contains_name(&i.attrs[..], sym::plugin_registrar) {
                     gate_feature_post!(&self, plugin_registrar, i.span,
                                        "compiler plugins are experimental and possibly buggy");
+                    self.parse_sess.span_diagnostic.span_warn(
+                        i.span,
+                        "`#[plugin_registrar]` is deprecated and will be removed in 1.44.0",
+                    );
                 }
                 if attr::contains_name(&i.attrs[..], sym::start) {
                     gate_feature_post!(&self, start, i.span,