diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2016-08-24 02:15:15 +0300 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2016-12-30 15:17:25 +0100 |
| commit | d4d5be18b702b5fd8b38b67d503860f788a14acd (patch) | |
| tree | 3262d6acc4849117b8779c783ac85defda36ac8b /src/libsyntax | |
| parent | b5260644af9cf556fe614d50e578f7c994013ae1 (diff) | |
| download | rust-d4d5be18b702b5fd8b38b67d503860f788a14acd.tar.gz rust-d4d5be18b702b5fd8b38b67d503860f788a14acd.zip | |
Feature gate the 128 bit types
Dangling a carrot in front of a donkey. This commit includes manual merge conflict resolution changes from a rebase by @est31.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 625af803458..a3f2cd3a0cd 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -321,6 +321,9 @@ declare_features! ( // `extern "ptx-*" fn()` (active, abi_ptx, "1.15.0", None), + + // The `i128` type + (active, i128_type, "1.15.0", Some(35118)), ); declare_features! ( @@ -1215,6 +1218,18 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { gate_feature_post!(&self, loop_break_value, e.span, "`break` with a value is experimental"); } + ast::ExprKind::Lit(ref lit) => { + if let ast::LitKind::Int(_, ref ty) = lit.node { + match *ty { + ast::LitIntType::Signed(ast::IntTy::I128) | + ast::LitIntType::Unsigned(ast::UintTy::U128) => { + gate_feature_post!(&self, i128_type, e.span, + "128-bit integers are not stable"); + } + _ => {} + } + } + } _ => {} } visit::walk_expr(self, e); |
