diff options
author | Aleksey Kladov <[email protected]> | 2019-07-19 09:24:41 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-19 11:16:25 +0100 |
commit | 0343c4a815a0e82d5e55e76a01d21b0f7a00ff5b (patch) | |
tree | 126bafdfcbcb04741b87876d6204c449113d96b5 /crates/ra_assists/src/add_explicit_type.rs | |
parent | e2b28f5bb8043e92b10f6a40696131007fc9dfe2 (diff) |
migrate ra_assists to the new AST
Diffstat (limited to 'crates/ra_assists/src/add_explicit_type.rs')
-rw-r--r-- | crates/ra_assists/src/add_explicit_type.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/add_explicit_type.rs b/crates/ra_assists/src/add_explicit_type.rs index bb47a32f0..a69cfc8e3 100644 --- a/crates/ra_assists/src/add_explicit_type.rs +++ b/crates/ra_assists/src/add_explicit_type.rs | |||
@@ -27,7 +27,7 @@ pub(crate) fn add_explicit_type(mut ctx: AssistCtx<impl HirDatabase>) -> Option< | |||
27 | // Infer type | 27 | // Infer type |
28 | let db = ctx.db; | 28 | let db = ctx.db; |
29 | let analyzer = hir::SourceAnalyzer::new(db, ctx.frange.file_id, stmt.syntax(), None); | 29 | let analyzer = hir::SourceAnalyzer::new(db, ctx.frange.file_id, stmt.syntax(), None); |
30 | let ty = analyzer.type_of(db, expr)?; | 30 | let ty = analyzer.type_of(db, &expr)?; |
31 | // Assist not applicable if the type is unknown | 31 | // Assist not applicable if the type is unknown |
32 | if is_unknown(&ty) { | 32 | if is_unknown(&ty) { |
33 | return None; | 33 | return None; |