Skip to content

Improve std::char doc #12759

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

Merged
merged 3 commits into from
Mar 9, 2014
Merged

Improve std::char doc #12759

merged 3 commits into from
Mar 9, 2014

Conversation

lucab
Copy link
Contributor

@lucab lucab commented Mar 7, 2014

This is mostly a reaction to #12730. If we are going to keep calling them char, at least make it clear that they aren't characters but codepoint/scalar.

//! as it can contain any Unicode code point except high-surrogate and
//! low-surrogate code points.
//!
//! As such, only values in the ranges \[0x0,0xD7FF16\] and \[0xE00016,0x10FFFF16\]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the trailing 16 is incorrect.

lucab added 3 commits March 8, 2014 09:10
This seems to be causing some confusion among users. Rust's char are
not 8bit characters, but 32bit UCS-4 codepoint without surrogates
(Unicode Scalar Values as per Unicode glossary).
Make the doc more explicit about it.

Signed-off-by: Luca Bruno <[email protected]>
Uniform and beautify doc-string for current rustdoc output.

Signed-off-by: Luca Bruno <[email protected]>
XID_* property are defined in UAX #31, just reference it here.

Signed-off-by: Luca Bruno <[email protected]>
@lucab
Copy link
Contributor Author

lucab commented Mar 8, 2014

Thanks for the the review, all comments addressed and branch rebased. Moreover, this was failing make tidy due to the long URL line, fixed now.

bors added a commit that referenced this pull request Mar 9, 2014
This is mostly a reaction to #12730. If we are going to keep calling them `char`, at least make it clear that they aren't characters but codepoint/scalar.
@bors bors closed this Mar 9, 2014
@bors bors merged commit 331f907 into rust-lang:master Mar 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants