1
Fork 0

Misc changes

This commit is contained in:
bjorn3 2019-08-14 11:36:24 +02:00
parent 2facd8e7ff
commit 581b6ea5be
2 changed files with 2 additions and 2 deletions

View file

@ -634,7 +634,7 @@ pub fn trans_get_discriminant<'a, 'tcx: 'a>(
let discr_val = layout
.ty
.ty_adt_def()
.map_or(index.as_u32() as u128, |def| {
.map_or(u128::from(index.as_u32()), |def| {
def.discriminant_for_variant(fx.tcx, *index).val
});
return CValue::const_val(fx, dest_layout.ty, discr_val);

View file

@ -86,7 +86,7 @@ pub fn maybe_codegen<'a, 'tcx>(
}
_ => {
// if msb_eq {
// lhs_cc
// lsb_cc
// } else {
// msb_cc
// }