diff options
author | Aleksey Kladov <[email protected]> | 2019-07-20 10:58:27 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-20 10:58:27 +0100 |
commit | f3bdbec1b68fa0e20f0b7b6c6ef64e1507970b0d (patch) | |
tree | f2cb82f74d2d60d5351c3d7c4d8e7bce4d351cab /crates/ra_assists/src/add_explicit_type.rs | |
parent | 6d5d82e412dea19ea48eecc6f7d5a4aa223a9599 (diff) |
rename range -> text_range
Diffstat (limited to 'crates/ra_assists/src/add_explicit_type.rs')
-rw-r--r-- | crates/ra_assists/src/add_explicit_type.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/add_explicit_type.rs b/crates/ra_assists/src/add_explicit_type.rs index a69cfc8e3..88970929f 100644 --- a/crates/ra_assists/src/add_explicit_type.rs +++ b/crates/ra_assists/src/add_explicit_type.rs | |||
@@ -16,10 +16,10 @@ pub(crate) fn add_explicit_type(mut ctx: AssistCtx<impl HirDatabase>) -> Option< | |||
16 | PatKind::BindPat(bind_pat) => bind_pat, | 16 | PatKind::BindPat(bind_pat) => bind_pat, |
17 | _ => return None, | 17 | _ => return None, |
18 | }; | 18 | }; |
19 | let pat_range = pat.syntax().range(); | 19 | let pat_range = pat.syntax().text_range(); |
20 | // The binding must have a name | 20 | // The binding must have a name |
21 | let name = pat.name()?; | 21 | let name = pat.name()?; |
22 | let name_range = name.syntax().range(); | 22 | let name_range = name.syntax().text_range(); |
23 | // Assist not applicable if the type has already been specified | 23 | // Assist not applicable if the type has already been specified |
24 | if stmt.syntax().children_with_tokens().any(|child| child.kind() == T![:]) { | 24 | if stmt.syntax().children_with_tokens().any(|child| child.kind() == T![:]) { |
25 | return None; | 25 | return None; |