about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 9231d4ad659..13b7944998a 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -78,6 +78,8 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
     ("while_let", Accepted),
 
     ("plugin", Active),
+    ("start", Active),
+    ("main", Active),
 
     // A temporary feature gate used to enable parser extensions needed
     // to bootstrap fix for #5723.
@@ -279,6 +281,18 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
                     self.gate_feature("plugin_registrar", i.span,
                                       "compiler plugins are experimental and possibly buggy");
                 }
+                if attr::contains_name(&i.attrs[], "start") {
+                    self.gate_feature("start", i.span,
+                                      "a #[start] function is an experimental \
+                                       feature whose signature may change \
+                                       over time");
+                }
+                if attr::contains_name(&i.attrs[], "main") {
+                    self.gate_feature("main", i.span,
+                                      "declaration of a nonstandard #[main] \
+                                       function may change over time, for now \
+                                       a top-level `fn main()` is required");
+                }
             }
 
             ast::ItemStruct(..) => {