diff options
| author | Taylor Cramer <cramertaylorj@gmail.com> | 2017-02-17 15:12:47 -0800 |
|---|---|---|
| committer | Taylor Cramer <cramertaylorj@gmail.com> | 2017-03-11 22:26:52 -0800 |
| commit | d95c5437222fd63d7b12676bc7916dbeb720f131 (patch) | |
| tree | a6090479d0d7489e29aec30a2bb3848b6671c8d2 /src/libsyntax/feature_gate.rs | |
| parent | 1b19284ad9d85f2848650be6dd466ad0e1e2d82c (diff) | |
| download | rust-d95c5437222fd63d7b12676bc7916dbeb720f131.tar.gz rust-d95c5437222fd63d7b12676bc7916dbeb720f131.zip | |
Add catch expr to AST and disallow catch as a struct name
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index e7bf16eae9e..15913d56d16 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -339,6 +339,9 @@ declare_features! ( // `extern "x86-interrupt" fn()` (active, abi_x86_interrupt, "1.17.0", Some(40180)), + + // Allows the `catch {...}` expression + (active, catch_expr, "1.17.0", Some(31436)), ); declare_features! ( @@ -1287,6 +1290,9 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } } } + ast::ExprKind::Catch(_) => { + gate_feature_post!(&self, catch_expr, e.span, "`catch` expression is experimental"); + } _ => {} } visit::walk_expr(self, e); |
