debug_assert with matches!

This commit is contained in:
satotake 2021-12-08 10:59:41 +00:00 committed by GitHub
parent 65e5a3929d
commit 11daeb4374

View file

@ -446,11 +446,14 @@ where
args.len(),
"NumToFloat: expected to have exactly one argument"
);
// debug_assert_eq!(
// Layout::Builtin(Builtin::Float(FloatWidth::F32 | FloatWidth::F64)),
// *ret_layout,
// "NumToFloat: expected to have return layout of type Float64"
// );
debug_assert!(
matches!(
*ret_layout,
Layout::Builtin(Builtin::Float(FloatWidth::F32 | FloatWidth::F64)),
),
"NumToFloat: expected to have return layout of type Float"
);
self.build_num_to_float(sym, &args[0], &arg_layouts[0], ret_layout)
}
LowLevel::NumRound => self.build_fn_call(