From 524c2e9a7c2ce1270141bc1150346d72975facc7 Mon Sep 17 00:00:00 2001
From: Aleksey Kladov <aleksey.kladov@gmail.com>
Date: Sun, 26 Jul 2020 12:43:53 +0200
Subject: Report type errors in metrics

---
 crates/rust-analyzer/src/cli/analysis_stats.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/crates/rust-analyzer/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs
index 10327ebb9..ccc058682 100644
--- a/crates/rust-analyzer/src/cli/analysis_stats.rs
+++ b/crates/rust-analyzer/src/cli/analysis_stats.rs
@@ -276,12 +276,16 @@ pub fn analysis_stats(
         num_exprs_unknown,
         if num_exprs > 0 { num_exprs_unknown * 100 / num_exprs } else { 100 }
     );
+    report_metric("unknown type", num_exprs_unknown, "#");
+
     eprintln!(
         "Expressions of partially unknown type: {} ({}%)",
         num_exprs_partially_unknown,
         if num_exprs > 0 { num_exprs_partially_unknown * 100 / num_exprs } else { 100 }
     );
+
     eprintln!("Type mismatches: {}", num_type_mismatches);
+    report_metric("type mismatches", num_type_mismatches, "#");
 
     let inference_time = inference_time.elapsed();
     let total_memory = ra_prof::memory_usage();
-- 
cgit v1.2.3