You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation for log functions is mixed up for all integer and unsigned integer types #96545
See for example for the types u32 and i32 and the function log2.
For u32::log2 we can read:
When the number is negative or zero it panics in debug mode and the return value is 0 in release mode.
For i32::log2:
When the number is zero it panics in debug mode and the return value is 0 in release mode.
The word negative only makes sense for i32 and not for u32 but it's exactly written the opposite. So, it's missing where it's important and it's written where it's not possible. The documentation was probably autogenerated, I think.
I think this PR is related
Activity
alex-semenyuk commentedon Apr 29, 2022
@rustbot claim
Rollup merge of rust-lang#96567 - alex-semenyuk:fix_docs_for_logs_fun…