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

Improve non ascii literal #4119

Merged
merged 3 commits into from May 27, 2019
Merged

Improve non ascii literal #4119

merged 3 commits into from May 27, 2019

Conversation

ghost
Copy link

@ghost ghost commented May 20, 2019

This PR improves the example of the non_ascii_literal lint.
It also makes it auto-fixable.

Please review. This is my first PR to this project.
(Thanks @flip1995 for the help :)

changelog: none
fixes #4117

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! Especially for the extra work! ❤️

When you change something on the lint emitting code, you also have to update the *.stderr reference files. How to do this is documented here. (You basically have to run tests/ui/update-all-references.sh after running cargo uitest)

There are two more occurences of span_help_and_lint in the code. It would be great if you could give those the same treatment.

clippy_lints/src/unicode.rs Outdated Show resolved Hide resolved
@flip1995
Copy link
Member

The *.stderr file is missing the suggestions. I think this is another case of #3582 (comment) and #3913, so nothing you can do about.

@flip1995 flip1995 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 21, 2019
@flip1995
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented May 27, 2019

📌 Commit 36c8aab has been approved by flip1995

flip1995 added a commit to flip1995/rust-clippy that referenced this pull request May 27, 2019
Improve non ascii literal

This PR improves the example of the [non_ascii_literal](https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal) lint.
It also makes it auto-fixable.

Please review. This is my first PR to this project.
(Thanks @flip1995 for the help :)

changelog: none
fixes rust-lang#4117
bors added a commit that referenced this pull request May 27, 2019
Rollup of 2 pull requests

Successful merges:

 - #4102 (Fix match_same_arms to fail late)
 - #4119 (Improve non ascii literal)

Failed merges:

r? @ghost
@bors bors merged commit 36c8aab into rust-lang:master May 27, 2019
@ghost ghost deleted the non_ascii_literal branch May 27, 2019 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

non_ascii_literal example should be more verbose
2 participants