diff options
| author | Kevin Ballard <kevin@sb.org> | 2014-08-26 20:00:41 -0700 |
|---|---|---|
| committer | Jakub Wieczorek <jakub@jakub.cc> | 2014-09-30 18:54:03 +0200 |
| commit | 8a609521007c0c0c37d8d2396085631c08ad5232 (patch) | |
| tree | 5b3ab3e9d4c89dc07227651e2f952576c2c6010f /src/libsyntax | |
| parent | 976438f78fdce8092430f4c81ca272293c48f1a0 (diff) | |
| download | rust-8a609521007c0c0c37d8d2396085631c08ad5232.tar.gz rust-8a609521007c0c0c37d8d2396085631c08ad5232.zip | |
Move `if let` behind a feature gate
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 1c6ee8acc94..fac4244228a 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -71,6 +71,8 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[ ("associated_types", Active), ("visible_private_types", Active), + ("if_let", Active), + // if you change this list without updating src/doc/rust.md, cmr will be sad // A temporary feature gate used to enable parser extensions needed @@ -356,6 +358,10 @@ impl<'a, 'v> Visitor<'v> for Context<'a> { e.span, "tuple indexing is experimental"); } + ast::ExprIfLet(..) => { + self.gate_feature("if_let", e.span, + "`if let` desugaring is experimental"); + } _ => {} } visit::walk_expr(self, e); |
