Add basic support for f16
and f128
to rustdoc
This commit is contained in:
parent
e3f63d9375
commit
98e172832f
1 changed files with 6 additions and 0 deletions
|
@ -1743,8 +1743,10 @@ pub(crate) enum PrimitiveType {
|
||||||
U32,
|
U32,
|
||||||
U64,
|
U64,
|
||||||
U128,
|
U128,
|
||||||
|
F16,
|
||||||
F32,
|
F32,
|
||||||
F64,
|
F64,
|
||||||
|
F128,
|
||||||
Char,
|
Char,
|
||||||
Bool,
|
Bool,
|
||||||
Str,
|
Str,
|
||||||
|
@ -1890,8 +1892,10 @@ impl PrimitiveType {
|
||||||
U32 => sym::u32,
|
U32 => sym::u32,
|
||||||
U64 => sym::u64,
|
U64 => sym::u64,
|
||||||
U128 => sym::u128,
|
U128 => sym::u128,
|
||||||
|
F16 => sym::f16,
|
||||||
F32 => sym::f32,
|
F32 => sym::f32,
|
||||||
F64 => sym::f64,
|
F64 => sym::f64,
|
||||||
|
F128 => sym::f128,
|
||||||
Str => sym::str,
|
Str => sym::str,
|
||||||
Bool => sym::bool,
|
Bool => sym::bool,
|
||||||
Char => sym::char,
|
Char => sym::char,
|
||||||
|
@ -2008,8 +2012,10 @@ impl From<ty::UintTy> for PrimitiveType {
|
||||||
impl From<ty::FloatTy> for PrimitiveType {
|
impl From<ty::FloatTy> for PrimitiveType {
|
||||||
fn from(float_ty: ty::FloatTy) -> PrimitiveType {
|
fn from(float_ty: ty::FloatTy) -> PrimitiveType {
|
||||||
match float_ty {
|
match float_ty {
|
||||||
|
ty::FloatTy::F16 => PrimitiveType::F16,
|
||||||
ty::FloatTy::F32 => PrimitiveType::F32,
|
ty::FloatTy::F32 => PrimitiveType::F32,
|
||||||
ty::FloatTy::F64 => PrimitiveType::F64,
|
ty::FloatTy::F64 => PrimitiveType::F64,
|
||||||
|
ty::FloatTy::F128 => PrimitiveType::F128,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue