diff options
| author | hkalbasi <hamidrezakalbasi@protonmail.com> | 2023-09-07 01:08:47 +0330 |
|---|---|---|
| committer | hkalbasi <hamidrezakalbasi@protonmail.com> | 2023-09-07 01:08:47 +0330 |
| commit | e4c469321ce1f3a3da429d01bc525efc19483b79 (patch) | |
| tree | 5df0b1f44c762408902dcc4e637cdc50b88401c4 | |
| parent | 77b359ae31427051d62a8c7e39b56bc9798f23ed (diff) | |
| download | rust-e4c469321ce1f3a3da429d01bc525efc19483b79.tar.gz rust-e4c469321ce1f3a3da429d01bc525efc19483b79.zip | |
Ignore enum variants in analysis stats of mir bodies
| -rw-r--r-- | crates/rust-analyzer/src/cli/analysis_stats.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs index 4a03be1893c..25ed57f18cc 100644 --- a/crates/rust-analyzer/src/cli/analysis_stats.rs +++ b/crates/rust-analyzer/src/cli/analysis_stats.rs @@ -317,9 +317,13 @@ impl flags::AnalysisStats { fn run_mir_lowering(&self, db: &RootDatabase, bodies: &[DefWithBody], verbosity: Verbosity) { let mut sw = self.stop_watch(); - let all = bodies.len() as u64; + let mut all = 0; let mut fail = 0; for &body in bodies { + if matches!(body, DefWithBody::Variant(_)) { + continue; + } + all += 1; let Err(e) = db.mir_body(body.into()) else { continue; }; |
