Skip to content

Commit

Permalink
Resolve needless_rwa_string_hashes clippy lint in test suite
Browse files Browse the repository at this point in the history
    error: unnecessary hashes around raw string literal
       --> tests/test.rs:683:17
        |
    683 |     check_spans(r###"r#"abc"#"###, &[(1, 0, 1, 8)]);
        |                 ^^^^^^^^^^^^^^^^^ help: try: `r##"r#"abc"#"##`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
        = note: `-D clippy::needless-raw-string-hashes` implied by `-D clippy::all`

    error: unnecessary hashes around raw string literal
       --> tests/test.rs:684:17
        |
    684 |     check_spans(r###"r#"ábc"#"###, &[(1, 0, 1, 8)]);
        |                 ^^^^^^^^^^^^^^^^^ help: try: `r##"r#"ábc"#"##`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
  • Loading branch information
dtolnay committed Jul 3, 2023
1 parent 10f5dc3 commit 51ed1bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test.rs
Expand Up @@ -680,8 +680,8 @@ fn non_ascii_tokens() {
check_spans("/*** ábc */ x", &[(1, 12, 1, 13)]);
check_spans(r#""abc""#, &[(1, 0, 1, 5)]);
check_spans(r#""ábc""#, &[(1, 0, 1, 5)]);
check_spans(r###"r#"abc"#"###, &[(1, 0, 1, 8)]);
check_spans(r###"r#"ábc"#"###, &[(1, 0, 1, 8)]);
check_spans(r##"r#"abc"#"##, &[(1, 0, 1, 8)]);
check_spans(r##"r#"ábc"#"##, &[(1, 0, 1, 8)]);
check_spans("r#\"a\nc\"#", &[(1, 0, 2, 3)]);
check_spans("r#\"á\nc\"#", &[(1, 0, 2, 3)]);
check_spans("'a'", &[(1, 0, 1, 3)]);
Expand Down

0 comments on commit 51ed1bb

Please sign in to comment.