From c3b9a19eb72ae9542272ae7a22ac3fb57c75daca Mon Sep 17 00:00:00 2001 From: TomasKralCZ Date: Sun, 19 Jan 2020 17:40:53 +0100 Subject: fix 'add_explicit_type' assist range --- crates/ra_assists/src/assists/add_explicit_type.rs | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'crates/ra_assists/src/assists') diff --git a/crates/ra_assists/src/assists/add_explicit_type.rs b/crates/ra_assists/src/assists/add_explicit_type.rs index f9f826b88..713abf910 100644 --- a/crates/ra_assists/src/assists/add_explicit_type.rs +++ b/crates/ra_assists/src/assists/add_explicit_type.rs @@ -1,7 +1,8 @@ use hir::{db::HirDatabase, HirDisplay}; use ra_syntax::{ ast::{self, AstNode, LetStmt, NameOwner}, - T, + SyntaxKind::EQ, + TextRange, T, }; use crate::{Assist, AssistCtx, AssistId}; @@ -34,6 +35,14 @@ pub(crate) fn add_explicit_type(ctx: AssistCtx) -> Option