-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix lint_single_char_pattern on raw string literal #4361
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,5 +132,35 @@ error: single-character string constant used as pattern | |
LL | x.starts_with("/x03"); // issue #2996 | ||
| ^^^^^^ help: try using a char instead: `'/x03'` | ||
|
||
error: aborting due to 22 previous errors | ||
error: single-character string constant used as pattern | ||
--> $DIR/single_char_pattern.rs:58:13 | ||
| | ||
LL | x.split(r"a"); | ||
| ^^^^ help: try using a char instead: `'a'` | ||
|
||
error: single-character string constant used as pattern | ||
--> $DIR/single_char_pattern.rs:59:13 | ||
| | ||
LL | x.split(r#"a"#); | ||
| ^^^^^^ help: try using a char instead: `'a'` | ||
|
||
error: single-character string constant used as pattern | ||
--> $DIR/single_char_pattern.rs:60:13 | ||
| | ||
LL | x.split(r###"a"###); | ||
| ^^^^^^^^^^ help: try using a char instead: `'a'` | ||
|
||
error: single-character string constant used as pattern | ||
--> $DIR/single_char_pattern.rs:61:13 | ||
| | ||
LL | x.split(r###"'"###); | ||
| ^^^^^^^^^^ help: try using a char instead: `'/''` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder why the suggestion is not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that might be caused by some |
||
|
||
error: single-character string constant used as pattern | ||
--> $DIR/single_char_pattern.rs:62:13 | ||
| | ||
LL | x.split(r###"#"###); | ||
| ^^^^^^^^^^ help: try using a char instead: `'#'` | ||
|
||
error: aborting due to 27 previous errors | ||
|
Uh oh!
There was an error while loading. Please reload this page.