about summary refs log tree commit diff
path: root/compiler/rustc_ast/src
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2024-03-01 04:02:47 -0500
committerTrevor Gross <tmgross@umich.edu>2024-03-01 13:59:06 -0500
commitbaba49d8f07ee37a07755cb26e94429f7254a4a1 (patch)
tree23ea6c3c2b76bb991efdf5ebf66639eb9f054b76 /compiler/rustc_ast/src
parent02778b3e0ea2ab8818e77811b05f9dc2e01c9028 (diff)
downloadrust-baba49d8f07ee37a07755cb26e94429f7254a4a1.tar.gz
rust-baba49d8f07ee37a07755cb26e94429f7254a4a1.zip
Add `f16` and `f128` to the AST
Diffstat (limited to 'compiler/rustc_ast/src')
-rw-r--r--compiler/rustc_ast/src/ast.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index 31dd358ad51..970e35221e1 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -1909,22 +1909,28 @@ pub struct FnSig {
 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
 #[derive(Encodable, Decodable, HashStable_Generic)]
 pub enum FloatTy {
+    F16,
     F32,
     F64,
+    F128,
 }
 
 impl FloatTy {
     pub fn name_str(self) -> &'static str {
         match self {
+            FloatTy::F16 => "f16",
             FloatTy::F32 => "f32",
             FloatTy::F64 => "f64",
+            FloatTy::F128 => "f128",
         }
     }
 
     pub fn name(self) -> Symbol {
         match self {
+            FloatTy::F16 => sym::f16,
             FloatTy::F32 => sym::f32,
             FloatTy::F64 => sym::f64,
+            FloatTy::F128 => sym::f128,
         }
     }
 }