don't lint needless_raw_string_hashes when it's unnecessary
This commit is contained in:
parent
ec765d9516
commit
cb52d19ce1
5 changed files with 31 additions and 36 deletions
|
|
@ -4,15 +4,15 @@
|
|||
#![feature(c_str_literals)]
|
||||
|
||||
fn main() {
|
||||
r"aaa";
|
||||
r#"aaa"#;
|
||||
r#"Hello "world"!"#;
|
||||
r####" "### "## "# "####;
|
||||
r###" "aa" "# "## "###;
|
||||
br"aaa";
|
||||
br#"aaa"#;
|
||||
br#"Hello "world"!"#;
|
||||
br####" "### "## "# "####;
|
||||
br###" "aa" "# "## "###;
|
||||
cr"aaa";
|
||||
cr#"aaa"#;
|
||||
cr#"Hello "world"!"#;
|
||||
cr####" "### "## "# "####;
|
||||
cr###" "aa" "# "## "###;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,10 @@
|
|||
error: unnecessary hashes around raw string literal
|
||||
--> $DIR/needless_raw_string_hashes.rs:7:5
|
||||
|
|
||||
LL | r#"aaa"#;
|
||||
| ^^^^^^^^ help: try: `r"aaa"`
|
||||
|
|
||||
= note: `-D clippy::needless-raw-string-hashes` implied by `-D warnings`
|
||||
|
||||
error: unnecessary hashes around raw string literal
|
||||
--> $DIR/needless_raw_string_hashes.rs:8:5
|
||||
|
|
||||
LL | r##"Hello "world"!"##;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `r#"Hello "world"!"#`
|
||||
|
|
||||
= note: `-D clippy::needless-raw-string-hashes` implied by `-D warnings`
|
||||
|
||||
error: unnecessary hashes around raw string literal
|
||||
--> $DIR/needless_raw_string_hashes.rs:9:5
|
||||
|
|
@ -24,12 +18,6 @@ error: unnecessary hashes around raw string literal
|
|||
LL | r######" "aa" "# "## "######;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r###" "aa" "# "## "###`
|
||||
|
||||
error: unnecessary hashes around raw string literal
|
||||
--> $DIR/needless_raw_string_hashes.rs:11:5
|
||||
|
|
||||
LL | br#"aaa"#;
|
||||
| ^^^^^^^^^ help: try: `br"aaa"`
|
||||
|
||||
error: unnecessary hashes around raw string literal
|
||||
--> $DIR/needless_raw_string_hashes.rs:12:5
|
||||
|
|
||||
|
|
@ -48,12 +36,6 @@ error: unnecessary hashes around raw string literal
|
|||
LL | br######" "aa" "# "## "######;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `br###" "aa" "# "## "###`
|
||||
|
||||
error: unnecessary hashes around raw string literal
|
||||
--> $DIR/needless_raw_string_hashes.rs:15:5
|
||||
|
|
||||
LL | cr#"aaa"#;
|
||||
| ^^^^^^^^^ help: try: `cr"aaa"`
|
||||
|
||||
error: unnecessary hashes around raw string literal
|
||||
--> $DIR/needless_raw_string_hashes.rs:16:5
|
||||
|
|
||||
|
|
@ -72,5 +54,5 @@ error: unnecessary hashes around raw string literal
|
|||
LL | cr######" "aa" "# "## "######;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cr###" "aa" "# "## "###`
|
||||
|
||||
error: aborting due to 12 previous errors
|
||||
error: aborting due to 9 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue