doc tweaks
This commit is contained in:
parent
2a7cf2c4b5
commit
e8af3cf2e7
|
@ -1032,7 +1032,7 @@ macro_rules! fixed {
|
|||
concat!(
|
||||
"Creates a fixed-point number from a floating-point number.\n",
|
||||
"\n",
|
||||
"Returns a tuple of the fixed-point number and a boolean indicating whether\n",
|
||||
"Returns a tuple of the fixed-point number and a [`bool`] indicating whether\n",
|
||||
"an overflow has occurred. On overflow, the wrapped value is returned.\n",
|
||||
"\n",
|
||||
"The floating-point value can be of type [`f32`] or [`f64`].\n",
|
||||
|
@ -1066,6 +1066,7 @@ macro_rules! fixed {
|
|||
"assert_eq!(Fix::overflowing_from_float(large), (wrapped, true));\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html\n",
|
||||
"[`f16` feature]: index.html#optional-features\n",
|
||||
"[`f16`]: https://docs.rs/half/^1.2/half/struct.f16.html\n",
|
||||
"[`f32`]: https://doc.rust-lang.org/nightly/std/primitive.f32.html\n",
|
||||
|
|
|
@ -49,15 +49,16 @@ use {
|
|||
pub trait Int: SealedInt {}
|
||||
|
||||
/// This trait is implemented for the primitive floating-point types,
|
||||
/// and for [`f16`] if the `f16` feature is enabled.
|
||||
/// and for [`f16`] if the [`f16` feature] is enabled.
|
||||
///
|
||||
/// This trait is sealed and cannot be implemented for more types; it
|
||||
/// is implemented for [`f32`] and [`f64`], and for [`f16`] if the
|
||||
/// `f16` feature is enabled.
|
||||
/// [`f16` feature] is enabled.
|
||||
///
|
||||
/// [`f16`]: https://docs.rs/half/^1.2/half/struct.f16.html
|
||||
/// [`f32`]: https://doc.rust-lang.org/nightly/std/primitive.f32.html
|
||||
/// [`f64`]: https://doc.rust-lang.org/nightly/std/primitive.f64.html
|
||||
/// [`f16` feature]: ../index.html#optional-features
|
||||
pub trait Float: SealedFloat {}
|
||||
|
||||
/// This trait is implemented for all the fixed-point types.
|
||||
|
|
Loading…
Reference in New Issue