Skip to content

Commit 93992f1

Browse files
authored
Rollup merge of rust-lang#129645 - beetrees:fix-float-docs, r=tgross35
Fix typos in floating-point primitive type docs Fixes a few typos. Also reflows the text of a couple of paragraphs in the source code to the standard line width to make the source easier to read (will have no effect on the rendered documentation).
2 parents 3c61ccc + d054835 commit 93992f1

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

library/core/src/primitive_docs.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -1130,8 +1130,8 @@ impl<T> (T,) {}
11301130
/// A 16-bit floating point type (specifically, the "binary16" type defined in IEEE 754-2008).
11311131
///
11321132
/// This type is very similar to [`prim@f32`] but has decreased precision because it uses half as many
1133-
/// bits. Please see [the documentation for [`prim@f32`] or [Wikipedia on
1134-
/// half-precision values][wikipedia] for more information.
1133+
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on half-precision
1134+
/// values][wikipedia] for more information.
11351135
///
11361136
/// Note that most common platforms will not support `f16` in hardware without enabling extra target
11371137
/// features, with the notable exception of Apple Silicon (also known as M1, M2, etc.) processors.
@@ -1296,14 +1296,12 @@ mod prim_f32 {}
12961296
#[doc(alias = "double")]
12971297
/// A 64-bit floating point type (specifically, the "binary64" type defined in IEEE 754-2008).
12981298
///
1299-
/// This type is very similar to [`f32`], but has increased
1300-
/// precision by using twice as many bits. Please see [the documentation for
1301-
/// `f32`][`f32`] or [Wikipedia on double precision
1299+
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
1300+
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
13021301
/// values][wikipedia] for more information.
13031302
///
13041303
/// *[See also the `std::f64::consts` module](crate::f64::consts).*
13051304
///
1306-
/// [`f32`]: prim@f32
13071305
/// [wikipedia]: https://en.wikipedia.org/wiki/Double-precision_floating-point_format
13081306
#[stable(feature = "rust1", since = "1.0.0")]
13091307
mod prim_f64 {}
@@ -1313,12 +1311,12 @@ mod prim_f64 {}
13131311
/// A 128-bit floating point type (specifically, the "binary128" type defined in IEEE 754-2008).
13141312
///
13151313
/// This type is very similar to [`prim@f32`] and [`prim@f64`], but has increased precision by using twice
1316-
/// as many bits as `f64`. Please see [the documentation for [`prim@f32`] or [Wikipedia on
1314+
/// as many bits as `f64`. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on
13171315
/// quad-precision values][wikipedia] for more information.
13181316
///
13191317
/// Note that no platforms have hardware support for `f128` without enabling target specific features,
13201318
/// as for all instruction set architectures `f128` is considered an optional feature.
1321-
/// Only Power ISA ("PowerPC") and RISCV specify it, and only certain microarchitectures
1319+
/// Only Power ISA ("PowerPC") and RISC-V specify it, and only certain microarchitectures
13221320
/// actually implement it. For x86-64 and AArch64, ISA support is not even specified,
13231321
/// so it will always be a software implementation significantly slower than `f64`.
13241322
///

0 commit comments

Comments
 (0)