mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Support local macro_rules
This commit is contained in:
parent
4c85e53531
commit
fe78a14bbb
6 changed files with 96 additions and 16 deletions
|
@ -787,6 +787,21 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_def_in_local_macro() {
|
||||
check_goto(
|
||||
"
|
||||
//- /lib.rs
|
||||
fn bar() {
|
||||
macro_rules! foo { () => { () } }
|
||||
<|>foo!();
|
||||
}
|
||||
",
|
||||
"foo MACRO_CALL FileId(1) [15; 48) [28; 31)",
|
||||
"macro_rules! foo { () => { () } }|foo",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_def_for_field_init_shorthand() {
|
||||
covers!(ra_ide_db::goto_def_for_field_init_shorthand);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue