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

Fix lint_single_char_pattern on raw string literal #4361

Merged
merged 2 commits into from
Aug 9, 2019

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Aug 9, 2019

Closes #4356
changelog: Handle raw string literal on single_char_literal lint.

Copy link
Member

@phansch phansch left a comment

Choose a reason for hiding this comment

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

r=me with the tests added and changelog updated

tests/ui/single_char_pattern.rs Show resolved Hide resolved
@phansch phansch added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Aug 9, 2019
--> $DIR/single_char_pattern.rs:61:13
|
LL | x.split(r###"'"###);
| ^^^^^^^^^^ help: try using a char instead: `'/''`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder why the suggestion is not `'\''`. It seems really awkward.

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 that might be caused by some compiletest-rs normalization of the output. The same happens with other suggestions

@phansch
Copy link
Member

phansch commented Aug 9, 2019

@bors r+ thanks!

@bors
Copy link
Collaborator

bors commented Aug 9, 2019

📌 Commit b825cdd has been approved by phansch

@bors
Copy link
Collaborator

bors commented Aug 9, 2019

⌛ Testing commit b825cdd with merge 26a1e53...

bors added a commit that referenced this pull request Aug 9, 2019
…=phansch

Fix lint_single_char_pattern on raw string literal

Closes #4356
changelog: Handle raw string literal on `single_char_literal` lint.
@bors
Copy link
Collaborator

bors commented Aug 9, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: phansch
Pushing 26a1e53 to master...

@bors bors merged commit b825cdd into rust-lang:master Aug 9, 2019
@tesuji tesuji deleted the fix-raw-string-on-single_char_pattern branch August 9, 2019 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lint_single_char_pattern shows extra quotation mark and number sign with raw string literal
3 participants