From d5c20af1648b0f50295cb8cf7e226cf7afa21d95 Mon Sep 17 00:00:00 2001 From: markmmm Date: Thu, 17 May 2018 21:41:49 +0800 Subject: [PATCH 1/2] Add u128 and i128 tokens Additionally all other tokens were sorted `u..` first, then `i..` - so I re-ordered `usize` & `isize` to conform --- src/tokens.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tokens.md b/src/tokens.md index 0129521da..d69ee8404 100644 --- a/src/tokens.md +++ b/src/tokens.md @@ -79,7 +79,7 @@ evaluated (primarily) at compile time. | Integer | Floating-point | |---------|----------------| -| `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `u64`, `i64`, `isize`, `usize` | `f32`, `f64` | +| `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `u64`, `i64`, `u128`, `i128`, `usize`, `isize` | `f32`, `f64` | ### Character and string literals From 7272b60c4db61a181228ad5febab12efeadceb21 Mon Sep 17 00:00:00 2001 From: markmmm Date: Thu, 17 May 2018 21:47:05 +0800 Subject: [PATCH 2/2] Added u128 & i128 under integer literals Also sorted `usize` & `isize` to match the sorting of other literals. --- src/tokens.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tokens.md b/src/tokens.md index d69ee8404..fe9b82d70 100644 --- a/src/tokens.md +++ b/src/tokens.md @@ -350,7 +350,7 @@ Like any literal, an integer literal may be followed (immediately, without any spaces) by an _integer suffix_, which forcibly sets the type of the literal. The integer suffix must be the name of one of the integral types: `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `u64`, `i64`, -`isize`, or `usize`. +`u128`, `i128`, `usize`, or `isize`. The type of an _unsuffixed_ integer literal is determined by type inference: