From 8834d35fa4b045659a7e1f2c3ba2afccaebd5010 Mon Sep 17 00:00:00 2001 From: beetrees Date: Tue, 27 Aug 2024 05:25:34 +0100 Subject: [PATCH 1/2] Fix typos in floating-point primitive type docs --- core/src/primitive_docs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/primitive_docs.rs b/core/src/primitive_docs.rs index 09ebef89fb0c2..70cfae3f7d991 100644 --- a/core/src/primitive_docs.rs +++ b/core/src/primitive_docs.rs @@ -1130,7 +1130,7 @@ impl (T,) {} /// A 16-bit floating point type (specifically, the "binary16" type defined in IEEE 754-2008). /// /// This type is very similar to [`prim@f32`] but has decreased precision because it uses half as many -/// bits. Please see [the documentation for [`prim@f32`] or [Wikipedia on +/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on /// half-precision values][wikipedia] for more information. /// /// Note that most common platforms will not support `f16` in hardware without enabling extra target @@ -1235,12 +1235,12 @@ mod prim_f64 {} /// A 128-bit floating point type (specifically, the "binary128" type defined in IEEE 754-2008). /// /// This type is very similar to [`prim@f32`] and [`prim@f64`], but has increased precision by using twice -/// as many bits as `f64`. Please see [the documentation for [`prim@f32`] or [Wikipedia on +/// as many bits as `f64`. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on /// quad-precision values][wikipedia] for more information. /// /// Note that no platforms have hardware support for `f128` without enabling target specific features, /// as for all instruction set architectures `f128` is considered an optional feature. -/// Only Power ISA ("PowerPC") and RISCV specify it, and only certain microarchitectures +/// Only Power ISA ("PowerPC") and RISC-V specify it, and only certain microarchitectures /// actually implement it. For x86-64 and AArch64, ISA support is not even specified, /// so it will always be a software implementation significantly slower than `f64`. /// From 6d8a1f6903e9e97ef1ae32135325cc3e9ce039b1 Mon Sep 17 00:00:00 2001 From: beetrees Date: Tue, 27 Aug 2024 05:26:28 +0100 Subject: [PATCH 2/2] Reflow a couple of paragraphs in floating-point primitive docs --- core/src/primitive_docs.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/src/primitive_docs.rs b/core/src/primitive_docs.rs index 70cfae3f7d991..a08b0ff60175f 100644 --- a/core/src/primitive_docs.rs +++ b/core/src/primitive_docs.rs @@ -1130,8 +1130,8 @@ impl (T,) {} /// A 16-bit floating point type (specifically, the "binary16" type defined in IEEE 754-2008). /// /// This type is very similar to [`prim@f32`] but has decreased precision because it uses half as many -/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on -/// half-precision values][wikipedia] for more information. +/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on half-precision +/// values][wikipedia] for more information. /// /// Note that most common platforms will not support `f16` in hardware without enabling extra target /// features, with the notable exception of Apple Silicon (also known as M1, M2, etc.) processors. @@ -1218,14 +1218,12 @@ mod prim_f32 {} #[doc(alias = "double")] /// A 64-bit floating point type (specifically, the "binary64" type defined in IEEE 754-2008). /// -/// This type is very similar to [`f32`], but has increased -/// precision by using twice as many bits. Please see [the documentation for -/// `f32`][`f32`] or [Wikipedia on double precision +/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many +/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision /// values][wikipedia] for more information. /// /// *[See also the `std::f64::consts` module](crate::f64::consts).* /// -/// [`f32`]: prim@f32 /// [wikipedia]: https://en.wikipedia.org/wiki/Double-precision_floating-point_format #[stable(feature = "rust1", since = "1.0.0")] mod prim_f64 {}