Use assert_matches around the compiler
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
|
||||
use rustc_middle::ty::layout::{HasParamEnv, TyAndLayout};
|
||||
use rustc_middle::ty::{Instance, Ty};
|
||||
@@ -254,10 +256,10 @@ pub trait BuilderMethods<'a, 'tcx>:
|
||||
} else {
|
||||
(in_ty, dest_ty)
|
||||
};
|
||||
assert!(matches!(
|
||||
assert_matches!(
|
||||
self.cx().type_kind(float_ty),
|
||||
TypeKind::Half | TypeKind::Float | TypeKind::Double | TypeKind::FP128
|
||||
));
|
||||
);
|
||||
assert_eq!(self.cx().type_kind(int_ty), TypeKind::Integer);
|
||||
|
||||
if let Some(false) = self.cx().sess().opts.unstable_opts.saturating_float_casts {
|
||||
|
||||
Reference in New Issue
Block a user