Escape characters in builtin macros correctly

This commit is contained in:
Edwin Cheng
2021-05-09 19:57:29 +08:00
parent cf4d4f646b
commit 01ce37c805
2 changed files with 4 additions and 4 deletions

View File

@@ -788,9 +788,9 @@ mod tests {
r##"
#[rustc_builtin_macro]
macro_rules! concat {}
concat!("foo", "r", 0, r#"bar"#, false);
concat!("foo", "r", 0, r#"bar"#, "\n", false);
"##,
expect![[r#""foor0barfalse""#]],
expect![[r#""foor0bar\nfalse""#]],
);
}
}