link to core libs instead of std libs where possible

This commit is contained in:
Trevor Spiteri 2019-12-23 17:21:46 +01:00
parent be35c826da
commit 59bc0bfd26
7 changed files with 64 additions and 64 deletions

View File

@ -234,8 +234,8 @@ additional terms or conditions.
[*typenum* crate]: https://crates.io/crates/typenum
[LICENSE-APACHE]: https://www.apache.org/licenses/LICENSE-2.0
[LICENSE-MIT]: https://opensource.org/licenses/MIT
[`Binary`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Binary.html
[`Display`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Display.html
[`Binary`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html
[`Display`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html
[`FixedI128`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedI128.html
[`FixedI16`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedI16.html
[`FixedI32`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedI32.html
@ -247,20 +247,20 @@ additional terms or conditions.
[`FixedU64`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedU64.html
[`FixedU8`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedU8.html
[`FromFixed`]: https://docs.rs/fixed/0.5.0/fixed/traits/trait.FromFixed.html
[`FromStr`]: https://doc.rust-lang.org/nightly/std/str/trait.FromStr.html
[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
[`FromStr`]: https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html
[`From`]: https://doc.rust-lang.org/nightly/core/convert/trait.From.html
[`I20F12`]: https://docs.rs/fixed/0.5.0/fixed/types/type.I20F12.html
[`I4F12`]: https://docs.rs/fixed/0.5.0/fixed/types/type.I4F12.html
[`I4F4`]: https://docs.rs/fixed/0.5.0/fixed/types/type.I4F4.html
[`Into`]: https://doc.rust-lang.org/nightly/std/convert/trait.Into.html
[`Into`]: https://doc.rust-lang.org/nightly/core/convert/trait.Into.html
[`LossyFrom`]: https://docs.rs/fixed/0.5.0/fixed/traits/trait.LossyFrom.html
[`LossyInto`]: https://docs.rs/fixed/0.5.0/fixed/traits/trait.LossyInto.html
[`LowerHex`]: https://doc.rust-lang.org/nightly/std/fmt/trait.LowerHex.html
[`Octal`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Octal.html
[`LowerHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html
[`Octal`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html
[`ToFixed`]: https://docs.rs/fixed/0.5.0/fixed/traits/trait.ToFixed.html
[`U12`]: https://docs.rs/fixed/0.5.0/fixed/types/extra/type.U12.html
[`U20F12`]: https://docs.rs/fixed/0.5.0/fixed/types/type.U20F12.html
[`UpperHex`]: https://doc.rust-lang.org/nightly/std/fmt/trait.UpperHex.html
[`UpperHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html
[`bf16`]: https://docs.rs/half/^1/half/struct.bf16.html
[`checked_from_num`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedI32.html#method.checked_from_num
[`f16`]: https://docs.rs/half/^1/half/struct.f16.html

View File

@ -188,8 +188,8 @@ additional terms or conditions.
[*typenum* crate]: https://crates.io/crates/typenum
[LICENSE-APACHE]: https://www.apache.org/licenses/LICENSE-2.0
[LICENSE-MIT]: https://opensource.org/licenses/MIT
[`Binary`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Binary.html
[`Display`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Display.html
[`Binary`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html
[`Display`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html
[`FixedI128`]: struct.FixedI128.html
[`FixedI16`]: struct.FixedI16.html
[`FixedI32`]: struct.FixedI32.html
@ -201,20 +201,20 @@ additional terms or conditions.
[`FixedU64`]: struct.FixedU64.html
[`FixedU8`]: struct.FixedU8.html
[`FromFixed`]: traits/trait.FromFixed.html
[`FromStr`]: https://doc.rust-lang.org/nightly/std/str/trait.FromStr.html
[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
[`FromStr`]: https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html
[`From`]: https://doc.rust-lang.org/nightly/core/convert/trait.From.html
[`I20F12`]: types/type.I20F12.html
[`I4F12`]: types/type.I4F12.html
[`I4F4`]: types/type.I4F4.html
[`Into`]: https://doc.rust-lang.org/nightly/std/convert/trait.Into.html
[`Into`]: https://doc.rust-lang.org/nightly/core/convert/trait.Into.html
[`LossyFrom`]: traits/trait.LossyFrom.html
[`LossyInto`]: traits/trait.LossyInto.html
[`LowerHex`]: https://doc.rust-lang.org/nightly/std/fmt/trait.LowerHex.html
[`Octal`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Octal.html
[`LowerHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html
[`Octal`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html
[`ToFixed`]: traits/trait.ToFixed.html
[`U12`]: types/extra/type.U12.html
[`U20F12`]: types/type.U20F12.html
[`UpperHex`]: https://doc.rust-lang.org/nightly/std/fmt/trait.UpperHex.html
[`UpperHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html
[`bf16`]: https://docs.rs/half/^1/half/struct.bf16.html
[`checked_from_num`]: struct.FixedI32.html#method.checked_from_num
[`f16`]: https://docs.rs/half/^1/half/struct.f16.html

View File

@ -149,7 +149,7 @@ assert_eq!(Fix::max_value().checked_mul(Fix::from_num(1)), Some(Fix::max_value()
assert_eq!(Fix::max_value().checked_mul(Fix::from_num(2)), None);
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_mul(self, rhs: $Fixed<Frac>) -> Option<$Fixed<Frac>> {
@ -173,7 +173,7 @@ assert_eq!(Fix::max_value().checked_div(Fix::from_num(1)), Some(Fix::max_value()
assert_eq!(Fix::max_value().checked_div(Fix::from_num(1) / 2), None);
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_div(self, rhs: $Fixed<Frac>) -> Option<$Fixed<Frac>> {

View File

@ -242,7 +242,7 @@ assert!(Fix::checked_from_num(2e38).is_none());
assert!(Fix::checked_from_num(std::f64::NAN).is_none());
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
[`ToFixed`]: traits/trait.ToFixed.html
[`bf16`]: https://docs.rs/half/^1.2/half/struct.bf16.html
[`f16` feature]: index.html#optional-features
@ -329,7 +329,7 @@ assert_eq!(one_point_625.checked_to_num::<f32>(), Some(1.625f32));
```
[`FromFixed`]: traits/trait.FromFixed.html
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
[`bf16`]: https://docs.rs/half/^1.2/half/struct.bf16.html
[`checked_from_fixed`]: traits/trait.FromFixed.html#tymethod.checked_from_fixed
[`f16` feature]: index.html#optional-features

View File

@ -568,7 +568,7 @@ assert_eq!(Fix::from_num(5).checked_neg(), None);",
"
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_neg(self) -> Option<$Fixed<Frac>> {
@ -589,7 +589,7 @@ assert_eq!((Fix::max_value() - one).checked_add(one), Some(Fix::max_value()));
assert_eq!(Fix::max_value().checked_add(one), None);
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_add(self, rhs: $Fixed<Frac>) -> Option<$Fixed<Frac>> {
@ -610,7 +610,7 @@ assert_eq!((Fix::min_value() + one).checked_sub(one), Some(Fix::min_value()));
assert_eq!(Fix::min_value().checked_sub(one), None);
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_sub(self, rhs: $Fixed<Frac>) -> Option<$Fixed<Frac>> {
@ -631,7 +631,7 @@ assert_eq!(Fix::max_value().checked_mul_int(1), Some(Fix::max_value()));
assert_eq!(Fix::max_value().checked_mul_int(2), None);
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_mul_int(self, rhs: $Inner) -> Option<$Fixed<Frac>> {
@ -664,7 +664,7 @@ assert_eq!(Fix::from_num(1).checked_div_int(0), None);
},
"```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_div_int(self, rhs: $Inner) -> Option<$Fixed<Frac>> {
@ -698,7 +698,7 @@ assert_eq!(Fix::from_num(1).checked_rem_int(0), None);
},
"```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_rem_int(self, rhs: $Inner) -> Option<$Fixed<Frac>> {
@ -731,7 +731,7 @@ assert_eq!(Fix::min_value().checked_div_int(-1), None);
},
"```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_div_euclid_int(self, rhs: $Inner) -> Option<$Fixed<Frac>> {
@ -764,7 +764,7 @@ assert_eq!(Fix::min_value().checked_rem_euclid_int(-1), None);
},
"```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_rem_euclid_int(self, rhs: $Inner) -> Option<$Fixed<Frac>> {
@ -785,7 +785,7 @@ assert_eq!((Fix::from_num(1) / 2).checked_shl(3), Some(Fix::from_num(4)));
assert_eq!((Fix::from_num(1) / 2).checked_shl(", $s_nbits, "), None);
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_shl(self, rhs: u32) -> Option<$Fixed<Frac>> {
@ -806,7 +806,7 @@ assert_eq!(Fix::from_num(4).checked_shr(3), Some(Fix::from_num(1) / 2));
assert_eq!(Fix::from_num(4).checked_shr(", $s_nbits, "), None);
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_shr(self, rhs: u32) -> Option<$Fixed<Frac>> {
@ -830,7 +830,7 @@ assert_eq!(Fix::from_num(-5).checked_abs(), Some(Fix::from_num(5)));
assert_eq!(Fix::min_value().checked_abs(), None);
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_abs(self) -> Option<$Fixed<Frac>> {
@ -858,7 +858,7 @@ assert_eq!(three_eights.checked_next_power_of_two(), Some(half));
assert!(Fix::max_value().checked_next_power_of_two().is_none());
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_next_power_of_two(self) -> Option<$Fixed<Frac>> {

View File

@ -318,7 +318,7 @@ assert_eq!(Fix::from_num(2.5).checked_ceil(), Some(Fix::from_num(3)));
"assert!(Fix::max_value().checked_ceil().is_none());
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_ceil(self) -> Option<$Fixed<Frac>> {
@ -368,9 +368,9 @@ assert!(AllFrac::min_value().checked_floor().is_none());
if_signed_unsigned! {
$Signedness,
"
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None",
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None",
"
[`Some`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.Some",
[`Some`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.Some",
},
"
";
@ -400,7 +400,7 @@ assert_eq!(Fix::from_num(2.5).checked_round(), Some(Fix::from_num(3)));
"assert!(Fix::max_value().checked_round().is_none());
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_round(self) -> Option<$Fixed<Frac>> {
@ -423,7 +423,7 @@ assert_eq!(Fix::from_num(3.5).checked_round_ties_to_even(), Some(Fix::from_num(4
assert!(Fix::max_value().checked_round_ties_to_even().is_none());
```
[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_round_ties_to_even(self) -> Option<$Fixed<Frac>> {

View File

@ -82,7 +82,7 @@ depending on the crates [optional features].
[`Deserialize`]: https://docs.rs/serde/^1/serde/de/trait.Deserialize.html
[`Fixed`]: trait.Fixed.html
[`PartialOrd`]: https://doc.rust-lang.org/nightly/std/cmp/trait.PartialOrd.html
[`PartialOrd`]: https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html
[`Serialize`]: https://docs.rs/serde/^1/serde/ser/trait.Serialize.html
[`bf16`]: https://docs.rs/half/^1/half/struct.bf16.html
[`f16`]: https://docs.rs/half/^1/half/struct.f16.html
@ -202,8 +202,8 @@ depending on the crates [optional features].
/// [`FixedU64`]: ../struct.FixedU64.html
/// [`FixedU8`]: ../struct.FixedU8.html
/// [`FixedUnsigned`]: trait.FixedUnsigned.html
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`TryFrom`]: https://doc.rust-lang.org/nightly/std/convert/trait.TryFrom.html
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
/// [`TryFrom`]: https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html
/// [`i16`]: https://doc.rust-lang.org/nightly/std/primitive.i16.html
/// [`i8`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html
/// [`u16`]: https://doc.rust-lang.org/nightly/std/primitive.u16.html
@ -308,7 +308,7 @@ where
///
/// Returns the same value as [`src.checked_to_fixed()`][`checked_to_fixed`].
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
/// [`checked_to_fixed`]: trait.ToFixed.html#tymethod.checked_to_fixed
fn checked_from_num<Src: ToFixed>(src: Src) -> Option<Self>;
@ -317,7 +317,7 @@ where
///
/// Returns the same value as [`Dst::checked_from_fixed(self)`][`checked_from_fixed`].
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
/// [`checked_from_fixed`]: trait.FromFixed.html#tymethod.checked_from_fixed
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>;
@ -476,25 +476,25 @@ where
/// Checked ceil. Rounds to the next integer towards +∞, returning
/// [`None`] on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_ceil(self) -> Option<Self>;
/// Checked floor. Rounds to the next integer towards −∞, returning
/// [`None`] on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_floor(self) -> Option<Self>;
/// Checked round. Rounds to the nearest integer, with ties
/// rounded away from zero, returning [`None`] on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_round(self) -> Option<Self>;
/// Checked round. Rounds to the nearest integer, with ties
/// rounded to even, returning [`None`] on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_round_ties_to_even(self) -> Option<Self>;
/// Saturating ceil. Rounds to the next integer towards +∞,
@ -605,74 +605,74 @@ where
/// Checked negation. Returns the negated value, or [`None`] on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_neg(self) -> Option<Self>;
/// Checked addition. Returns the sum, or [`None`] on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_add(self, rhs: Self) -> Option<Self>;
/// Checked subtraction. Returns the difference, or [`None`] on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_sub(self, rhs: Self) -> Option<Self>;
/// Checked multiplication. Returns the product, or [`None`] on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_mul(self, rhs: Self) -> Option<Self>;
/// Checked division. Returns the quotient, or [`None`] if the
/// divisor is zero or on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_div(self, rhs: Self) -> Option<Self>;
/// Checked multiplication by an integer. Returns the product, or
/// [`None`] on overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>;
/// Checked division by an integer. Returns the quotient, or
/// [`None`] if the divisor is zero or if the division results in
/// overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>;
/// Checked fixed-point remainder for division by an integer.
/// Returns the remainder, or [`None`] if the divisor is zero or
/// if the division results in overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>;
/// Checked Euclidean division by an integer. Returns the
/// quotient, or [`None`] if the divisor is zero or if the
/// division results in overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_div_euclid_int(self, rhs: Self::Bits) -> Option<Self>;
/// Checked fixed-point remainder for Euclidean division by an
/// integer. Returns the remainder, or [`None`] if the divisor is
/// zero or if the division results in overflow.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_rem_euclid_int(self, rhs: Self::Bits) -> Option<Self>;
/// Checked shift left. Returns the shifted number, or [`None`] if
/// `rhs` ≥ the number of bits.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_shl(self, rhs: u32) -> Option<Self>;
/// Checked shift right. Returns the shifted number, or [`None`]
/// if `rhs` ≥ the number of bits.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_shr(self, rhs: u32) -> Option<Self>;
/// Saturated negation. Returns the negated value, saturating on overflow.
@ -959,7 +959,7 @@ pub trait FixedSigned: Fixed + Neg<Output = Self> {
///
/// Overflow can only occur when trying to find the absolute value of the minimum value.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_abs(self) -> Option<Self>;
/// Saturating absolute value. Returns the absolute value, saturating on overflow.
@ -1011,7 +1011,7 @@ pub trait FixedUnsigned: Fixed {
/// Returns the smallest power of two that is ≥ `self`, or [`None`] if the
/// next power of two is too large to represent.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_next_power_of_two(self) -> Option<Self>;
}
@ -1053,8 +1053,8 @@ pub trait LossyFrom<Src> {
/// assert_eq!(lossy, I12F4::from_bits(0x0012));
/// ```
///
/// [`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
/// [`Into`]: https://doc.rust-lang.org/nightly/std/convert/trait.Into.html
/// [`From`]: https://doc.rust-lang.org/nightly/core/convert/trait.From.html
/// [`Into`]: https://doc.rust-lang.org/nightly/core/convert/trait.Into.html
/// [`LossyFrom`]: trait.LossyFrom.html
pub trait LossyInto<Dst> {
/// Performs the conversion.
@ -1111,7 +1111,7 @@ pub trait FromFixed {
///
/// Any extra fractional bits are truncated.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_from_fixed<F: Fixed>(src: F) -> Option<Self>
where
Self: Sized;
@ -1187,7 +1187,7 @@ pub trait ToFixed {
///
/// Any extra fractional bits are truncated.
///
/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None
/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
fn checked_to_fixed<F: Fixed>(self) -> Option<F>;
/// Converts to a fixed-point number, saturating if it does not fit.