Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I ran into this case yesterday, for some cases there are warnings now. In this case I used ".div_ceil(...)" from from the Num [0] crate.

   (some_integer).div_ceil(&2)
                  ^^^^^^^^

    = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in  behavior!
    = note: for more information, see issue #48919 <https://github.com/rust-lang/rust/issues/48919>
    = help: call with fully qualified syntax `num::Integer::div_ceil(...)` to keep using the current method
    = note: `#[warn(unstable_name_collisions)]` on by default
[0]: https://crates.io/crates/num


This warning happens during the time the method is added to libstd but is still unstable.


Given that all important codebases should have CI that rejects warnings and runs clippy I would say it is acceptable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: