summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/needless_raw_string_hashes.rs
blob: dcc2af69f4e9c64086c3f1957c9e6bfd174391fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#![allow(clippy::no_effect, unused)]
#![warn(clippy::needless_raw_string_hashes)]
#![feature(c_str_literals)]

fn main() {
    r#"\aaa"#;
    r##"Hello "world"!"##;
    r######" "### "## "# "######;
    r######" "aa" "# "## "######;
    br#"\aaa"#;
    br##"Hello "world"!"##;
    br######" "### "## "# "######;
    br######" "aa" "# "## "######;
    cr#"\aaa"#;
    cr##"Hello "world"!"##;
    cr######" "### "## "# "######;
    cr######" "aa" "# "## "######;

    r#"
        \a
        multiline
        string
    "#;

    r###"rust"###;
    r#"hello world"#;
}