Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/goto_definition.rs')
| -rw-r--r-- | crates/ide/src/goto_definition.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs index 1518b49515..ef3f14d79d 100644 --- a/crates/ide/src/goto_definition.rs +++ b/crates/ide/src/goto_definition.rs @@ -1497,6 +1497,29 @@ fn f() { ); } #[test] + fn method_call_inside_block() { + check( + r#" +trait Twait { + fn a(&self); +} + +fn outer() { + struct Stwuct; + + impl Twait for Stwuct { + fn a(&self){} + //^ + } + fn f() { + let s = Stwuct; + s.a$0(); + } +} + "#, + ); + } + #[test] fn path_call() { check( r#" |