-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make std::char
functions and constants associated to char
.
#71854
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@@ -92,15 +92,15 @@ const MAX_THREE_B: u32 = 0x10000; | |||
/// [Unicode Scalar Value]: http://www.unicode.org/glossary/#unicode_scalar_value | |||
/// [Code Point]: http://www.unicode.org/glossary/#code_point | |||
#[stable(feature = "rust1", since = "1.0.0")] | |||
pub const MAX: char = '\u{10ffff}'; | |||
pub const MAX: char = char::MAX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub use instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not possible because here char::
is not a module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rustdoc can export primitive types but not associated constants. This could be improved.
Anyway, it currently rustdoc can't do that, just ignore these comments.
r? @LukasKalbertodt for libs team approval |
r? @Amanieu |
@bors r+ |
📌 Commit 0e12a9d has been approved by |
…ts, r=Amanieu Make `std::char` functions and constants associated to `char`. First step to fix rust-lang#71763.
Rollup of 7 pull requests Successful merges: - rust-lang#71854 (Make `std::char` functions and constants associated to `char`.) - rust-lang#72111 (rustc-book: Document `-Z strip=val` option) - rust-lang#72272 (Fix going back in history to a search result page on firefox) - rust-lang#72296 (Suggest installing VS Build Tools in more situations) - rust-lang#72365 (Remove unused `StableHashingContext::node_to_hir_id` method) - rust-lang#72371 (FIX - Char documentation for unexperienced users) - rust-lang#72397 (llvm: Expose tiny code model to users) Failed merges: r? @ghost
First step to fix #71763.