Use assert_matches around the compiler

This commit is contained in:
Michael Goulet 2024-08-11 12:10:36 -04:00
parent 68d2e8a66e
commit c361c924a0
39 changed files with 100 additions and 49 deletions

View file

@ -1,3 +1,4 @@
use std::assert_matches::assert_matches;
use std::cmp::Ordering;
use rustc_codegen_ssa::base::{compare_simd_types, wants_msvc_seh, wants_wasm_eh};
@ -1142,7 +1143,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
if cfg!(debug_assertions) {
for (ty, arg) in arg_tys.iter().zip(args) {
if ty.is_simd() {
assert!(matches!(arg.val, OperandValue::Immediate(_)));
assert_matches!(arg.val, OperandValue::Immediate(_));
}
}
}