From 1a99285ac722d9aa5c431c9c77ef8228e9623aee Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Wed, 25 Feb 2015 10:57:01 +0100 Subject: [PATCH 1/2] reserve more primitive types --- text/0000-reserve-types.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 text/0000-reserve-types.md diff --git a/text/0000-reserve-types.md b/text/0000-reserve-types.md new file mode 100644 index 00000000000..af943a8332c --- /dev/null +++ b/text/0000-reserve-types.md @@ -0,0 +1,27 @@ +- Start Date: 2014-06-25 +- RFC PR #: (leave this empty) +- Rust Issue #: (leave this empty) + +# Summary + +Reserve more numeric types. + +# Motivation + +It is conceivable that Rust will gain support for types such as `f128`, `f16`, +or `u128`. In the interest of backwards compatability, extend the grammar to +reserve these. + +Adding them is backwards incompatible because `type PRIMITIVE = T;` is an error. + +# Detailed design + +Reserve the following type names: `fN`, `uN`, `iN` for `N` a multiple of 8. + +# Drawbacks + +Makes the grammar larger for types which we may never use. + +# Alternatives + +New types could require a flag to be enabled. From 8120ceb2d3638c30c153d88a1200d3d49208cbe9 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Wed, 25 Feb 2015 11:03:42 +0100 Subject: [PATCH 2/2] fixup --- text/0000-reserve-types.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/text/0000-reserve-types.md b/text/0000-reserve-types.md index af943a8332c..7f6d586d0ce 100644 --- a/text/0000-reserve-types.md +++ b/text/0000-reserve-types.md @@ -18,6 +18,10 @@ Adding them is backwards incompatible because `type PRIMITIVE = T;` is an error. Reserve the following type names: `fN`, `uN`, `iN` for `N` a multiple of 8. +Reserve additionally `dN` for decimal floating point numbers. + +Reserve additionally `mN` for SSE. + # Drawbacks Makes the grammar larger for types which we may never use. @@ -25,3 +29,5 @@ Makes the grammar larger for types which we may never use. # Alternatives New types could require a flag to be enabled. + +C99 uses `_Bool` instead of `bool` because `_T` is reserved.