-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
max_value() vs MAX #29841
Comments
The problem is that let inf = u32::max_value(); works. |
oh great! Thank you. I guess I'll close this then. |
This is definitely a problematic thing, though. @steveklabnik do you think there's anything that can be done here? |
Can we remove the std::u32 module and its relatives? It's so useless.. http://doc.rust-lang.org/nightly/std/u32/index.html Maybe just hide it? |
It's waiting on associated consts, iirc. |
We link to the module from primitive pages and vice versa, so I'm not really sure there's much to do. I mean, other than add examples, which will happen as part of #29358 |
SGTM, closing in favour of that. |
I'm not sure if I'm calling this wrong, but when I try to use
let inf = std::u32::max_value();
I get the error:
, but following PR #11790 it looks like it should be
let inf = std::u32::MAX;
which of course works. None of this is a problem, except the documentation says to use max_value()
https://doc.rust-lang.org/std/primitive.u32.html
Please let me know if I'm doing something wrong though.
The text was updated successfully, but these errors were encountered: