about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-01-11 20:53:24 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-01-12 00:00:53 +0530
commitad7e33efee023822bd63fa6f942c25582ef12a1e (patch)
tree0358035fd7630bfb4c7369b4ae9bb5c42fadcde9 /src/libsyntax/feature_gate.rs
parentdd074ab4eedcb08ca8a1861fc1e62f125e23fa8b (diff)
downloadrust-ad7e33efee023822bd63fa6f942c25582ef12a1e.tar.gz
rust-ad7e33efee023822bd63fa6f942c25582ef12a1e.zip
Feature gate #[rustc_on_unimplemented]
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
-rw-r--r--src/libsyntax/feature_gate.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 8175c0a9eec..8929bbe0232 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -71,6 +71,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
     ("visible_private_types", Active),
     ("slicing_syntax", Active),
     ("box_syntax", Active),
+    ("on_unimplemented", Active),
 
     ("if_let", Accepted),
     ("while_let", Accepted),
@@ -249,6 +250,10 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
                 self.gate_feature("linkage", i.span,
                                   "the `linkage` attribute is experimental \
                                    and not portable across platforms")
+            } else if attr.name() == "rustc_on_unimplemented" {
+                self.gate_feature("on_unimplemented", i.span,
+                                  "the `#[rustc_on_unimplemented]` attribute \
+                                  is an experimental feature")
             }
         }
         match i.node {