mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Fixes #2143
This commit is contained in:
parent
5451bfb9a1
commit
c46be83a34
2 changed files with 22 additions and 1 deletions
|
@ -315,6 +315,25 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_definition_works_for_macros_in_use_tree() {
|
||||
check_goto(
|
||||
"
|
||||
//- /lib.rs
|
||||
use foo::foo<|>;
|
||||
|
||||
//- /foo/lib.rs
|
||||
#[macro_export]
|
||||
macro_rules! foo {
|
||||
() => {
|
||||
{}
|
||||
};
|
||||
}
|
||||
",
|
||||
"foo MACRO_CALL FileId(2) [0; 66) [29; 32)",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_definition_works_for_methods() {
|
||||
covers!(goto_definition_works_for_methods);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue