mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Add macro expansion test for raw variable names
This commit is contained in:
parent
157c7d0114
commit
a53ee64e70
1 changed files with 28 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue