Skip to content

Commit

Permalink
Ignore needless_raw_string_hashes pedantic clippy lint in test
Browse files Browse the repository at this point in the history
    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:153:43
        |
    153 |     assert(Literal::byte_character(b'a'), r#"  b'a'  "#);
        |                                           ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
        = note: `-W clippy::needless-raw-string-hashes` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_raw_string_hashes)]`
    help: remove all the hashes around the string literal
        |
    153 -     assert(Literal::byte_character(b'a'), r#"  b'a'  "#);
    153 +     assert(Literal::byte_character(b'a'), r"  b'a'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:154:44
        |
    154 |     assert(Literal::byte_character(b'\0'), r#"  b'\0'  "#);
        |                                            ^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    154 -     assert(Literal::byte_character(b'\0'), r#"  b'\0'  "#);
    154 +     assert(Literal::byte_character(b'\0'), r"  b'\0'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:155:44
        |
    155 |     assert(Literal::byte_character(b'\t'), r#"  b'\t'  "#);
        |                                            ^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    155 -     assert(Literal::byte_character(b'\t'), r#"  b'\t'  "#);
    155 +     assert(Literal::byte_character(b'\t'), r"  b'\t'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:156:44
        |
    156 |     assert(Literal::byte_character(b'\n'), r#"  b'\n'  "#);
        |                                            ^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    156 -     assert(Literal::byte_character(b'\n'), r#"  b'\n'  "#);
    156 +     assert(Literal::byte_character(b'\n'), r"  b'\n'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:157:44
        |
    157 |     assert(Literal::byte_character(b'\r'), r#"  b'\r'  "#);
        |                                            ^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    157 -     assert(Literal::byte_character(b'\r'), r#"  b'\r'  "#);
    157 +     assert(Literal::byte_character(b'\r'), r"  b'\r'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:158:44
        |
    158 |     assert(Literal::byte_character(b'\''), r#"  b'\''  "#);
        |                                            ^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    158 -     assert(Literal::byte_character(b'\''), r#"  b'\''  "#);
    158 +     assert(Literal::byte_character(b'\''), r"  b'\''  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:159:44
        |
    159 |     assert(Literal::byte_character(b'\\'), r#"  b'\\'  "#);
        |                                            ^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    159 -     assert(Literal::byte_character(b'\\'), r#"  b'\\'  "#);
    159 +     assert(Literal::byte_character(b'\\'), r"  b'\\'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:160:46
        |
    160 |     assert(Literal::byte_character(b'\x1f'), r#"  b'\x1F'  "#);
        |                                              ^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    160 -     assert(Literal::byte_character(b'\x1f'), r#"  b'\x1F'  "#);
    160 +     assert(Literal::byte_character(b'\x1f'), r"  b'\x1F'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:269:37
        |
    269 |     assert(Literal::character('a'), r#"  'a'  "#);
        |                                     ^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    269 -     assert(Literal::character('a'), r#"  'a'  "#);
    269 +     assert(Literal::character('a'), r"  'a'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:270:38
        |
    270 |     assert(Literal::character('\t'), r#"  '\t'  "#);
        |                                      ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    270 -     assert(Literal::character('\t'), r#"  '\t'  "#);
    270 +     assert(Literal::character('\t'), r"  '\t'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:271:37
        |
    271 |     assert(Literal::character('❤'), r#"  '❤'  "#);
        |                                     ^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    271 -     assert(Literal::character('❤'), r#"  '❤'  "#);
    271 +     assert(Literal::character('❤'), r"  '❤'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:272:38
        |
    272 |     assert(Literal::character('\''), r#"  '\''  "#);
        |                                      ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    272 -     assert(Literal::character('\''), r#"  '\''  "#);
    272 +     assert(Literal::character('\''), r"  '\''  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:274:38
        |
    274 |     assert(Literal::character('\0'), r#"  '\0'  "#);
        |                                      ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    274 -     assert(Literal::character('\0'), r#"  '\0'  "#);
    274 +     assert(Literal::character('\0'), r"  '\0'  ");
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test.rs:275:41
        |
    275 |     assert(Literal::character('\u{1}'), r#"  '\u{1}'  "#);
        |                                         ^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    275 -     assert(Literal::character('\u{1}'), r#"  '\u{1}'  "#);
    275 +     assert(Literal::character('\u{1}'), r"  '\u{1}'  ");
        |
  • Loading branch information
dtolnay committed Apr 14, 2024
1 parent 0c9449e commit 1ff5c1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test.rs
@@ -1,6 +1,7 @@
#![allow(
clippy::assertions_on_result_states,
clippy::items_after_statements,
clippy::needless_raw_string_hashes,
clippy::non_ascii_literal,
clippy::octal_escapes
)]
Expand Down

0 comments on commit 1ff5c1f

Please sign in to comment.