mirror of
https://github.com/rust-lang/rust
synced 2024-10-01 22:34:35 +00:00
improve safety comment
This commit is contained in:
parent
eaaed00ff5
commit
90bba8beb5
|
@ -1270,7 +1270,7 @@ pub const fn isqrt(self) -> Self {
|
|||
// Inform the optimizer about it.
|
||||
unsafe { hint::assert_unchecked(res < 1 << (Self::BITS / 2)) };
|
||||
|
||||
// SAFETY: The result is positive.
|
||||
// SAFETY: The square root of an integer >= 1 is always >= 1.
|
||||
unsafe { Self::new_unchecked(res) }
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue