diff options
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index f186aff6d36..862c52dc4bd 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -233,6 +233,9 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status // Allows `#[deprecated]` attribute ("deprecated", "1.6.0", Some(29935), Active), + + // allow using type ascription in expressions + ("type_ascription", "1.6.0", Some(23416), Active), ]; // (changing above list without updating src/doc/reference.md makes @cmr sad) @@ -960,6 +963,10 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> { "box expression syntax is experimental; \ you can call `Box::new` instead."); } + ast::ExprType(..) => { + self.gate_feature("type_ascription", e.span, + "type ascription is experimental"); + } _ => {} } visit::walk_expr(self, e); |
