summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorJohn Gallagher <jgallagher@bignerdranch.com>2014-10-02 23:32:32 -0400
committerJohn Gallagher <jgallagher@bignerdranch.com>2014-10-10 20:30:32 -0400
commit660cf180701d5fc961a900d626c1a1d314852bb1 (patch)
tree8199ada567a752b9d2ccc7253d43a5b0c0829f97 /src/libsyntax
parentb003f104490599c49d27842c9a25b158e7cccdcb (diff)
downloadrust-660cf180701d5fc961a900d626c1a1d314852bb1.tar.gz
rust-660cf180701d5fc961a900d626c1a1d314852bb1.zip
Move `while let` behind `while_let` feature gate
Diffstat (limited to 'src/libsyntax')
-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 c3c36d04442..28b20133a1f 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -73,6 +73,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
     ("slicing_syntax", Active),
 
     ("if_let", Active),
+    ("while_let", Active),
 
     // if you change this list without updating src/doc/reference.md, cmr will be sad
 
@@ -356,6 +357,10 @@ impl<'a, 'v> Visitor<'v> for Context<'a> {
                                   e.span,
                                   "slicing syntax is experimental");
             }
+            ast::ExprWhileLet(..) => {
+                self.gate_feature("while_let", e.span,
+                                  "`while let` syntax is experimental");
+            }
             _ => {}
         }
         visit::walk_expr(self, e);