Function rustc_mir_transform::match_branches::can_cast
source ยท fn can_cast(
tcx: TyCtxt<'_>,
src_val: impl Into<u128>,
src_layout: TyAndLayout<'_>,
cast_ty: Ty<'_>,
target_scalar: ScalarInt,
) -> bool
Expand description
Check if the cast constant using IntToInt
is equal to the target constant.