Skip to content

Commit 98e1728

Browse files
committed
Add basic support for f16 and f128 to rustdoc
1 parent e3f63d9 commit 98e1728

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/librustdoc/clean/types.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1743,8 +1743,10 @@ pub(crate) enum PrimitiveType {
17431743
U32,
17441744
U64,
17451745
U128,
1746+
F16,
17461747
F32,
17471748
F64,
1749+
F128,
17481750
Char,
17491751
Bool,
17501752
Str,
@@ -1890,8 +1892,10 @@ impl PrimitiveType {
18901892
U32 => sym::u32,
18911893
U64 => sym::u64,
18921894
U128 => sym::u128,
1895+
F16 => sym::f16,
18931896
F32 => sym::f32,
18941897
F64 => sym::f64,
1898+
F128 => sym::f128,
18951899
Str => sym::str,
18961900
Bool => sym::bool,
18971901
Char => sym::char,
@@ -2008,8 +2012,10 @@ impl From<ty::UintTy> for PrimitiveType {
20082012
impl From<ty::FloatTy> for PrimitiveType {
20092013
fn from(float_ty: ty::FloatTy) -> PrimitiveType {
20102014
match float_ty {
2015+
ty::FloatTy::F16 => PrimitiveType::F16,
20112016
ty::FloatTy::F32 => PrimitiveType::F32,
20122017
ty::FloatTy::F64 => PrimitiveType::F64,
2018+
ty::FloatTy::F128 => PrimitiveType::F128,
20132019
}
20142020
}
20152021
}

0 commit comments

Comments
 (0)