about summary refs log tree commit diff
path: root/src/librustc/plugin
diff options
context:
space:
mode:
authorJonas Schievink <jonas@schievink.net>2015-08-29 00:23:32 +0200
committerJonas Schievink <jonas@schievink.net>2015-08-29 11:37:40 +0200
commit4b571b055d8ac9c77d1337e2bda2652bfc024de9 (patch)
tree66e62558fdb4c8b1bf034e0fba1ce6ae5af401a9 /src/librustc/plugin
parent6f28232756a6842acb1d2da6defdea43cfe95dde (diff)
downloadrust-4b571b055d8ac9c77d1337e2bda2652bfc024de9.tar.gz
rust-4b571b055d8ac9c77d1337e2bda2652bfc024de9.zip
Handle gateage of built-in attributes seperately
This allows marking attributes as whitelisted/crate-only independent of
their feature gate status.

Closes #24213
Diffstat (limited to 'src/librustc/plugin')
-rw-r--r--src/librustc/plugin/registry.rs5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/librustc/plugin/registry.rs b/src/librustc/plugin/registry.rs
index 5faaa53e4d0..2f3625ff22f 100644
--- a/src/librustc/plugin/registry.rs
+++ b/src/librustc/plugin/registry.rs
@@ -145,11 +145,6 @@ impl<'a> Registry<'a> {
     /// `Whitelisted` attributes will additionally not trigger the `unused_attribute`
     /// lint. `CrateLevel` attributes will not be allowed on anything other than a crate.
     pub fn register_attribute(&mut self, name: String, ty: AttributeType) {
-        if let AttributeType::Gated(..) = ty {
-            self.sess.span_err(self.krate_span, "plugin tried to register a gated \
-                                                 attribute. Only `Normal`, `Whitelisted`, \
-                                                 and `CrateLevel` attributes are allowed");
-        }
         self.attributes.push((name, ty));
     }
 }