diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-04 22:03:15 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-05 12:38:33 +0530 |
| commit | 145b83e63355c672f8e43129f8e7833fac35dce2 (patch) | |
| tree | 041ed4dd28872ac22473460cdfc8ca8b7ef260aa /src/libsyntax | |
| parent | c8c4d85b5014a947f57acd9a1e14b7864689f73d (diff) | |
| parent | 34410ec748b92e15c445ba7371561e2e5c5aaa55 (diff) | |
| download | rust-145b83e63355c672f8e43129f8e7833fac35dce2.tar.gz rust-145b83e63355c672f8e43129f8e7833fac35dce2.zip | |
Rollup merge of #22994 - eddyb:unsuffix-ints-good, r=alexcrichton
Automatic has-same-types testing methodology can be found in #22501. Because most of them don't work with `--pretty=typed`, compile-fail tests were manually audited. r? @aturon
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast_util.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index 264e05f5c8d..26d7562cdb2 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -159,10 +159,10 @@ pub fn int_ty_to_string(t: IntTy, val: Option<i64>) -> String { pub fn int_ty_max(t: IntTy) -> u64 { match t { - TyI8 => 0x80u64, - TyI16 => 0x8000u64, - TyIs(_) | TyI32 => 0x80000000u64, // actually ni about TyIs - TyI64 => 0x8000000000000000u64 + TyI8 => 0x80, + TyI16 => 0x8000, + TyIs(_) | TyI32 => 0x80000000, // actually ni about TyIs + TyI64 => 0x8000000000000000 } } @@ -185,10 +185,10 @@ pub fn uint_ty_to_string(t: UintTy, val: Option<u64>) -> String { pub fn uint_ty_max(t: UintTy) -> u64 { match t { - TyU8 => 0xffu64, - TyU16 => 0xffffu64, - TyUs(_) | TyU32 => 0xffffffffu64, // actually ni about TyUs - TyU64 => 0xffffffffffffffffu64 + TyU8 => 0xff, + TyU16 => 0xffff, + TyUs(_) | TyU32 => 0xffffffff, // actually ni about TyUs + TyU64 => 0xffffffffffffffff } } |
