diff options
author | Aleksey Kladov <[email protected]> | 2020-02-26 12:04:22 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-26 12:04:22 +0000 |
commit | 5c64ad27e041bcdb281c0a751720ceb3a6369d04 (patch) | |
tree | 12d89798f61b276f8bd640db07276a7d4e92b1c2 /crates/ra_assists/src/handlers/inline_local_variable.rs | |
parent | 04deae3dba7c9b7054f7a1d64e4b93a05aecc132 (diff) | |
parent | c3a4c4429de83450654795534e64e878a774a088 (diff) |
Merge pull request #3222 from matklad/identity
Introduce Semantics API
Diffstat (limited to 'crates/ra_assists/src/handlers/inline_local_variable.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/inline_local_variable.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/inline_local_variable.rs b/crates/ra_assists/src/handlers/inline_local_variable.rs index 91b588243..53a72309b 100644 --- a/crates/ra_assists/src/handlers/inline_local_variable.rs +++ b/crates/ra_assists/src/handlers/inline_local_variable.rs | |||
@@ -44,8 +44,7 @@ pub(crate) fn inline_local_variable(ctx: AssistCtx) -> Option<Assist> { | |||
44 | } else { | 44 | } else { |
45 | let_stmt.syntax().text_range() | 45 | let_stmt.syntax().text_range() |
46 | }; | 46 | }; |
47 | let analyzer = ctx.source_analyzer(bind_pat.syntax(), None); | 47 | let refs = ctx.sema.find_all_refs(&bind_pat); |
48 | let refs = analyzer.find_all_refs(&bind_pat); | ||
49 | if refs.is_empty() { | 48 | if refs.is_empty() { |
50 | return None; | 49 | return None; |
51 | }; | 50 | }; |