fix FP with needless_raw_string_hashes

This commit is contained in:
mojave2 2023-09-17 12:54:00 +08:00
parent f54275f20f
commit 5b790ff9e0
No known key found for this signature in database
5 changed files with 35 additions and 4 deletions

View file

@ -21,4 +21,7 @@ fn main() {
multiline
string
";
r"rust";
r"hello world";
}

View file

@ -21,4 +21,7 @@ fn main() {
multiline
string
"#;
r###"rust"###;
r#"hello world"#;
}

View file

@ -163,5 +163,29 @@ LL | string
LL ~ ";
|
error: aborting due to 13 previous errors
error: unnecessary hashes around raw string literal
--> $DIR/needless_raw_string_hashes.rs:25:5
|
LL | r###"rust"###;
| ^^^^^^^^^^^^^
|
help: remove all the hashes around the literal
|
LL - r###"rust"###;
LL + r"rust";
|
error: unnecessary hashes around raw string literal
--> $DIR/needless_raw_string_hashes.rs:26:5
|
LL | r#"hello world"#;
| ^^^^^^^^^^^^^^^^
|
help: remove all the hashes around the literal
|
LL - r#"hello world"#;
LL + r"hello world";
|
error: aborting due to 15 previous errors