improve safety comment · model-checking/verify-rust-std@f3b1c8a (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit f3b1c8a
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
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 | }; |