From 8a609521007c0c0c37d8d2396085631c08ad5232 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Tue, 26 Aug 2014 20:00:41 -0700 Subject: Move `if let` behind a feature gate --- src/libsyntax/feature_gate.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libsyntax') 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); -- cgit 1.4.1-3-g733a5