summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/literal-to-string.rs
blob: 494d17cbeeaff208b8968f04a2a91ab48ddfe8b6 (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
// check-pass
// edition: 2021
#![feature(c_str_literals)]

// aux-build: print-tokens.rs
extern crate print_tokens;

fn main() {
    print_tokens::print_tokens! {
        1
        17u8
        42.
        3.14f32
        b'a'
        b'\xFF'
        'c'
        '\x32'
        "\"str\""
        r#""raw" str"#
        r###"very ##"raw"## str"###
        b"\"byte\" str"
        br#""raw" "byte" str"#
        c"\"c\" str"
        cr#""raw" "c" str"#
    }
}