Skip to content

Commit 73bde2f

Browse files
committed
Revert "pre-expansion gate label_break_value"
This reverts commit 137ded8.
1 parent 20bfff6 commit 73bde2f

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/libsyntax/feature_gate/check.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,12 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
518518
"type ascription is experimental");
519519
}
520520
}
521+
ast::ExprKind::Block(_, opt_label) => {
522+
if let Some(label) = opt_label {
523+
gate_feature_post!(&self, label_break_value, label.ident.span,
524+
"labels on blocks are unstable");
525+
}
526+
}
521527
_ => {}
522528
}
523529
visit::walk_expr(self, e)
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
#[cfg(FALSE)]
2-
pub fn foo() {
1+
pub fn main() {
32
'a: { //~ ERROR labels on blocks are unstable
43
break 'a;
54
}
65
}
7-
8-
fn main() {}

src/test/ui/feature-gates/feature-gate-label_break_value.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: labels on blocks are unstable
2-
--> $DIR/feature-gate-label_break_value.rs:3:5
2+
--> $DIR/feature-gate-label_break_value.rs:2:5
33
|
44
LL | 'a: {
55
| ^^

0 commit comments

Comments
 (0)