mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Don't bother with focus range for navigation to locals
This commit is contained in:
parent
46a299bcee
commit
7c25224f05
2 changed files with 49 additions and 7 deletions
|
@ -817,4 +817,45 @@ mod tests {
|
|||
"T",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_within_macro() {
|
||||
check_goto(
|
||||
"
|
||||
//- /lib.rs
|
||||
macro_rules! id {
|
||||
($($tt:tt)*) => ($($tt)*)
|
||||
}
|
||||
|
||||
fn foo() {
|
||||
let x = 1;
|
||||
id!({
|
||||
let y = <|>x;
|
||||
let z = y;
|
||||
});
|
||||
}
|
||||
",
|
||||
"x BIND_PAT FileId(1) [69; 70)",
|
||||
"x",
|
||||
);
|
||||
|
||||
check_goto(
|
||||
"
|
||||
//- /lib.rs
|
||||
macro_rules! id {
|
||||
($($tt:tt)*) => ($($tt)*)
|
||||
}
|
||||
|
||||
fn foo() {
|
||||
let x = 1;
|
||||
id!({
|
||||
let y = x;
|
||||
let z = <|>y;
|
||||
});
|
||||
}
|
||||
",
|
||||
"y BIND_PAT FileId(1) [98; 99)",
|
||||
"y",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue