diff options
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; |