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