aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-20 10:56:59 +0000
committerGitHub <[email protected]>2019-12-20 10:56:59 +0000
commit6e9335d311c058986c4bbef5aadbe208b87f63c7 (patch)
tree00ecd85453675103fe415a7b28c565a2a9e94853 /crates/ra_ide/src
parent08c6933104baca84fd4135a76cdc7daf60a0c631 (diff)
parent67c2aea182c375108ebb8b923f5679e4f7fef1df (diff)
Merge #2607
2607: More ground work for local defs r=matklad a=matklad bors r+ Co-authored-by: Aleksey Kladov <[email protected]>
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}