Skip to content

Commit 580d357

Browse files
author
Nicholas Nethercote
committed
Change the assert in is_useful to a debug_assert.
It's hot in the `match-stress-enum` benchmark.
1 parent 68568dc commit 580d357

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: compiler/rustc_mir_build/src/thir/pattern/usefulness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ fn is_useful<'p, 'tcx>(
797797
return ret;
798798
}
799799

800-
assert!(rows.iter().all(|r| r.len() == v.len()));
800+
debug_assert!(rows.iter().all(|r| r.len() == v.len()));
801801

802802
let ty = v.head().ty();
803803
let is_non_exhaustive = cx.is_foreign_non_exhaustive_enum(ty);

0 commit comments

Comments
 (0)