Skip to content
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

Put non-ascii identifiers behind a feature gate. #10605

Merged
merged 2 commits into from
Nov 22, 2013

Conversation

huonw
Copy link
Member

@huonw huonw commented Nov 22, 2013

@emberian
Copy link
Member

👍


// a codepoint is ascii if and only if it is one byte when
// encoded as UTF-8
if s.iter().any(|c| c.len_utf8_bytes() != 1) {
Copy link
Member

Choose a reason for hiding this comment

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

This could just use the is_ascii() method defined in std::ascii.

if s.is_ascii() {
    ...
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, fancy.

@pcwalton
Copy link
Contributor

Thanks. We'll discuss at the Tuesday meeting.

@pcwalton
Copy link
Contributor

Seems everyone's in favor so I'll just r+.

@bors bors closed this Nov 22, 2013
@bors bors merged commit ab2a99f into rust-lang:master Nov 22, 2013
@huonw huonw deleted the ascii-ident-gate branch November 22, 2013 23:20
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 11, 2023
Clippy Book Chapter Updates Reborn: Type Checking

This PR adds a new chapter to the book: "Type Checking", it hasn't changed a lot from the source mainly because there wasn't many reviews on it and I haven't see a lot of things that needed a change.

## Notes

- I have some doubts about the whole "`is_*` Usage" section, what do you think about it.
- For discussion about  the whole project, please use the tracking issue for the project rust-lang#10597 (It also contains a timeline, discussions, and more information)

changelog: Add a new "Type Checking" chapter to the book

r? `@flip1995`
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.

5 participants