diff options
Diffstat (limited to 'crates/rust-analyzer/src/cli/analysis_stats.rs')
-rw-r--r-- | crates/rust-analyzer/src/cli/analysis_stats.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs index ad0759bda..c81c1d26e 100644 --- a/crates/rust-analyzer/src/cli/analysis_stats.rs +++ b/crates/rust-analyzer/src/cli/analysis_stats.rs | |||
@@ -12,7 +12,7 @@ use hir::{ | |||
12 | AssocItem, Crate, HasSource, HirDisplay, ModuleDef, | 12 | AssocItem, Crate, HasSource, HirDisplay, ModuleDef, |
13 | }; | 13 | }; |
14 | use hir_def::FunctionId; | 14 | use hir_def::FunctionId; |
15 | use hir_ty::{Ty, TypeWalk}; | 15 | use hir_ty::TypeWalk; |
16 | use ide_db::base_db::{ | 16 | use ide_db::base_db::{ |
17 | salsa::{self, ParallelDatabase}, | 17 | salsa::{self, ParallelDatabase}, |
18 | SourceDatabaseExt, | 18 | SourceDatabaseExt, |
@@ -187,12 +187,12 @@ impl AnalysisStatsCmd { | |||
187 | for (expr_id, _) in body.exprs.iter() { | 187 | for (expr_id, _) in body.exprs.iter() { |
188 | let ty = &inference_result[expr_id]; | 188 | let ty = &inference_result[expr_id]; |
189 | num_exprs += 1; | 189 | num_exprs += 1; |
190 | if let Ty::Unknown = ty { | 190 | if ty.is_unknown() { |
191 | num_exprs_unknown += 1; | 191 | num_exprs_unknown += 1; |
192 | } else { | 192 | } else { |
193 | let mut is_partially_unknown = false; | 193 | let mut is_partially_unknown = false; |
194 | ty.walk(&mut |ty| { | 194 | ty.walk(&mut |ty| { |
195 | if let Ty::Unknown = ty { | 195 | if ty.is_unknown() { |
196 | is_partially_unknown = true; | 196 | is_partially_unknown = true; |
197 | } | 197 | } |
198 | }); | 198 | }); |