mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Add local functions to bodies
This commit is contained in:
parent
08c6933104
commit
a04177f135
6 changed files with 76 additions and 21 deletions
|
@ -858,4 +858,21 @@ mod tests {
|
|||
"y",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_def_in_local_fn() {
|
||||
check_goto(
|
||||
"
|
||||
//- /lib.rs
|
||||
fn main() {
|
||||
fn foo() {
|
||||
let x = 92;
|
||||
<|>x;
|
||||
}
|
||||
}
|
||||
",
|
||||
"x BIND_PAT FileId(1) [39; 40)",
|
||||
"x",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue