Add macro expansion test for raw variable names

This commit is contained in:
Mark Murphy 2024-11-26 00:42:27 -05:00
parent 157c7d0114
commit a53ee64e70

View file

@ -184,3 +184,31 @@ fn test() {
"#]],
);
}
#[test]
fn meta_variable_raw_name_equals_non_raw() {
check(
r#"
macro_rules! m {
($r#name:tt) => {
$name
}
}
fn test() {
m!(1234)
}
"#,
expect![[r#"
macro_rules! m {
($r#name:tt) => {
$name
}
}
fn test() {
1234
}
"#]],
);
}