about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2024-03-01 04:03:23 -0500
committerTrevor Gross <tmgross@umich.edu>2024-03-01 13:59:06 -0500
commit6781801d33a2236ab14f10e7c15fd4e1a2a9b162 (patch)
tree9c61b332b9d2920d8a51f6d6c53936e7fb4f153f
parentbaba49d8f07ee37a07755cb26e94429f7254a4a1 (diff)
downloadrust-6781801d33a2236ab14f10e7c15fd4e1a2a9b162.tar.gz
rust-6781801d33a2236ab14f10e7c15fd4e1a2a9b162.zip
Propegate HIR and AST `f16` and `f128` types to rustdoc
-rw-r--r--src/librustdoc/clean/types.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index 1707b514ef8..c35baeb4cf5 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -1777,8 +1777,10 @@ impl PrimitiveType {
             hir::PrimTy::Uint(UintTy::U32) => PrimitiveType::U32,
             hir::PrimTy::Uint(UintTy::U64) => PrimitiveType::U64,
             hir::PrimTy::Uint(UintTy::U128) => PrimitiveType::U128,
+            hir::PrimTy::Float(FloatTy::F16) => PrimitiveType::F16,
             hir::PrimTy::Float(FloatTy::F32) => PrimitiveType::F32,
             hir::PrimTy::Float(FloatTy::F64) => PrimitiveType::F64,
+            hir::PrimTy::Float(FloatTy::F128) => PrimitiveType::F128,
             hir::PrimTy::Str => PrimitiveType::Str,
             hir::PrimTy::Bool => PrimitiveType::Bool,
             hir::PrimTy::Char => PrimitiveType::Char,
@@ -1977,8 +1979,10 @@ impl From<ast::UintTy> for PrimitiveType {
 impl From<ast::FloatTy> for PrimitiveType {
     fn from(float_ty: ast::FloatTy) -> PrimitiveType {
         match float_ty {
+            ast::FloatTy::F16 => PrimitiveType::F16,
             ast::FloatTy::F32 => PrimitiveType::F32,
             ast::FloatTy::F64 => PrimitiveType::F64,
+            ast::FloatTy::F128 => PrimitiveType::F128,
         }
     }
 }