Revert "pre-expansion gate label_break_value"

This reverts commit 137ded8ab1.
This commit is contained in:
Eduard-Mihai Burtescu 2019-10-31 18:25:40 +02:00
parent 20bfff66a9
commit 73bde2f0ce
3 changed files with 8 additions and 5 deletions

View file

@ -518,6 +518,12 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
"type ascription is experimental");
}
}
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)

View file

@ -1,8 +1,5 @@
#[cfg(FALSE)]
pub fn foo() {
pub fn main() {
'a: { //~ ERROR labels on blocks are unstable
break 'a;
}
}
fn main() {}

View file

@ -1,5 +1,5 @@
error[E0658]: labels on blocks are unstable
--> $DIR/feature-gate-label_break_value.rs:3:5
--> $DIR/feature-gate-label_break_value.rs:2:5
|
LL | 'a: {
| ^^