From dfa98318e17bc1c42615fd02efe946bfb8dfeb7c Mon Sep 17 00:00:00 2001 From: est31 Date: Sat, 12 May 2018 11:33:33 +0200 Subject: Add feature gate label_break_value --- src/libsyntax/feature_gate.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index bf78723e413..f1229520c77 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -466,6 +466,9 @@ declare_features! ( // inconsistent bounds in where clauses (active, trivial_bounds, "1.28.0", Some(48214), None), + + // 'a: { break 'a; } + (active, label_break_value, "1.28.0", Some(48594), None), ); declare_features! ( @@ -1696,6 +1699,12 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { "multiple patterns in `if let` and `while let` are unstable"); } } + ast::ExprKind::Block(_, opt_label) => { + if let Some(label) = opt_label { + gate_feature_post!(&self, label_break_value, label.ident.span, + "labels on blocks are unstable"); + } + } _ => {} } visit::walk_expr(self, e); -- cgit 1.4.1-3-g733a5