Why is usize::div_ceil only available on 64-bit targets? https://doc.rust-lang.org/std/primitive.usize.html#method.div_ceil
Why is usize::div_ceil only available on 64-bit targets? https://doc.rust-lang.org/std/primitive.usize.html#method.div_ceil
@blp it's not; it's just that the documentation is generated on a 64-bit target, and rustdoc is only documenting the 64-bit version (since the implementation depends on what the actual usize size is)
the way cfg-ed out code works in the compiler is kinda bad and it's not even accessible to stuff like rustdoc
but there's a way of fixing this, it's just that apparently nobody has done that
@clarfonthey Oh, wonderful, it was super weird to think it was 64-bit specific.
@clarfonthey @blp And to see these are available on lower word-size targets, see the implementation: https://doc.rust-lang.org/src/core/num/mod.rs.html#1214-1290
it’s calling the same macro to generate all the same functions, just behind different `[cfg()]`s.
@blp yeah, found bug for it: https://github.com/rust-lang/rust/issues/149786