The following floating point functions seems to be missing a #[must_use] attribute:
impl f32 { // also f16, f64, f128
fn classify(self) -> FpCategory;
fn next_up(self) -> Self;
fn next_down(self) -> Self;
fn midpoint(self, other: Self) -> Self;
fn sin_cos(self) -> (Self, Self);
}
It seems like that the other floating point functions have one of the following reasons:
#[must_use]
#[must_use = "method returns a new number and does not mutate the original value"]
#[must_use = "this returns the clamped value and does not modify the original"]
#[must_use = "this returns the result of the comparison, without modifying either input"]
#[must_use = "this returns the result of the operation, without modifying the original"]
Edit: This original mentioned 13 functions, but there is actually only 5 functions without the attribute, so the list has been updated. (tyilo/std-traits@e012d28)
The following floating point functions seems to be missing a
#[must_use]attribute:It seems like that the other floating point functions have one of the following reasons:
Edit: This original mentioned 13 functions, but there is actually only 5 functions without the attribute, so the list has been updated. (tyilo/std-traits@e012d28)