diff options
| author | Trevor Gross <tmgross@umich.edu> | 2024-02-28 03:50:15 -0500 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2024-02-28 12:58:32 -0500 |
| commit | 98e172832f17e123d89313cae060349f29ebf817 (patch) | |
| tree | b19b19e177a4db7c391828d573dbb3b514050e48 | |
| parent | e3f63d93755f2f62b4a52686f608b9664e87f092 (diff) | |
| download | rust-98e172832f17e123d89313cae060349f29ebf817.tar.gz rust-98e172832f17e123d89313cae060349f29ebf817.zip | |
Add basic support for `f16` and `f128` to rustdoc
| -rw-r--r-- | src/librustdoc/clean/types.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 30cadfe7dac..1707b514ef8 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -1743,8 +1743,10 @@ pub(crate) enum PrimitiveType { U32, U64, U128, + F16, F32, F64, + F128, Char, Bool, Str, @@ -1890,8 +1892,10 @@ impl PrimitiveType { U32 => sym::u32, U64 => sym::u64, U128 => sym::u128, + F16 => sym::f16, F32 => sym::f32, F64 => sym::f64, + F128 => sym::f128, Str => sym::str, Bool => sym::bool, Char => sym::char, @@ -2008,8 +2012,10 @@ impl From<ty::UintTy> for PrimitiveType { impl From<ty::FloatTy> for PrimitiveType { fn from(float_ty: ty::FloatTy) -> PrimitiveType { match float_ty { + ty::FloatTy::F16 => PrimitiveType::F16, ty::FloatTy::F32 => PrimitiveType::F32, ty::FloatTy::F64 => PrimitiveType::F64, + ty::FloatTy::F128 => PrimitiveType::F128, } } } |
