diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/proc-macro/literal-to-string.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/literal-to-string.rs b/tests/ui/proc-macro/literal-to-string.rs new file mode 100644 index 000000000..494d17cbe --- /dev/null +++ b/tests/ui/proc-macro/literal-to-string.rs @@ -0,0 +1,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"# + } +} |