-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tracking issue for associated functions and consts of std::char
.
#71763
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I can help to implement to do this. This is what I would do:
|
Given the module structure inside the |
…ts, r=Amanieu Make `std::char` functions and constants associated to `char`. First step to fix rust-lang#71763.
This is currently the issue pointed as tracking issue for the new features added in #71854, so this issue should be reopened or a proper tracking issue should be created. |
std::char
functions and constants could be associated to the char
type.std::char
.
Are there any blockers to stabilizing this? |
This would be great to stabilise as it trips new users up that the methods aren't available on char in stable rust at the moment. |
I'm assuming that no separate RFC is necessary here since, speaking as the author of RFC 2700, it was simple oversight on my part that the wannabe associated items on |
The
std::char
module defines functions that could be instead associated methods of thechar
type (e.g.,decode_utf16
). Making them associated to thechar
type allows to use directlychar::method
instead ofstd::char::method
. Similarly, thestd::char::MAX
andstd::char::REPLACEMENT_CHARACTER
could also be associated constants (like done with integer constants in #68952).The text was updated successfully, but these errors were encountered: