improve safety comment · model-checking/verify-rust-std@f3b1c8a (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Commit f3b1c8a

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -1270,7 +1270,7 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
1270 1270 // Inform the optimizer about it.
1271 1271 unsafe { hint::assert_unchecked(res < 1 << (Self::BITS / 2)) };
1272 1272
1273 -// SAFETY: The result is positive.
1273 +// SAFETY: The square root of an integer >= 1 is always >= 1.
1274 1274 unsafe { Self::new_unchecked(res) }
1275 1275 }
1276 1276 };