diff options
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 9 |
1 files changed, 9 insertions, 0 deletions
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); |
