Skip to content

Commit e4c4693

Browse files
committed
Ignore enum variants in analysis stats of mir bodies
1 parent 77b359a commit e4c4693

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/rust-analyzer/src/cli/analysis_stats.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,13 @@ impl flags::AnalysisStats {
317317

318318
fn run_mir_lowering(&self, db: &RootDatabase, bodies: &[DefWithBody], verbosity: Verbosity) {
319319
let mut sw = self.stop_watch();
320-
let all = bodies.len() as u64;
320+
let mut all = 0;
321321
let mut fail = 0;
322322
for &body in bodies {
323+
if matches!(body, DefWithBody::Variant(_)) {
324+
continue;
325+
}
326+
all += 1;
323327
let Err(e) = db.mir_body(body.into()) else {
324328
continue;
325329
};

0 commit comments

Comments
 (0)