aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-20 10:19:09 +0000
committerAleksey Kladov <[email protected]>2019-12-20 10:52:17 +0000
commita04177f135be89ddbf1788c6f747c26812e90438 (patch)
treef2dbdf832caab0448427641b6a93ae3c66465c12 /crates/ra_ide/src
parent08c6933104baca84fd4135a76cdc7daf60a0c631 (diff)
Add local functions to bodies
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/goto_definition.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs
index 184555792..ee4ae3e03 100644
--- a/crates/ra_ide/src/goto_definition.rs
+++ b/crates/ra_ide/src/goto_definition.rs
@@ -858,4 +858,21 @@ mod tests {
858 "y", 858 "y",
859 ); 859 );
860 } 860 }
861
862 #[test]
863 fn goto_def_in_local_fn() {
864 check_goto(
865 "
866 //- /lib.rs
867 fn main() {
868 fn foo() {
869 let x = 92;
870 <|>x;
871 }
872 }
873 ",
874 "x BIND_PAT FileId(1) [39; 40)",
875 "x",
876 );
877 }
861} 878}