Add local functions to bodies

This commit is contained in:
Aleksey Kladov 2019-12-20 11:19:09 +01:00
parent 08c6933104
commit a04177f135
6 changed files with 76 additions and 21 deletions

View file

@ -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",
);
}
}