]> git.lizzy.rs Git - rust.git/commitdiff
Misc changes
authorbjorn3 <bjorn3@users.noreply.github.com>
Wed, 14 Aug 2019 09:36:24 +0000 (11:36 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Wed, 14 Aug 2019 09:36:24 +0000 (11:36 +0200)
src/base.rs
src/codegen_i128.rs

index d636ba3d763550b718f62726321a390e20e22540..2d490ae8679bf7f52d29c91c10d51ba864ec078d 100644 (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);
index 9cd6bc8c78687a2d7f1a5bfa1c5adf70d46f2815..f173b4dbd5d9e913321651fd1caaeacf6fb5bbea 100644 (file)
@@ -86,7 +86,7 @@ pub fn maybe_codegen<'a, 'tcx>(
                 }
                 _ => {
                     // if msb_eq {
-                    //     lhs_cc
+                    //     lsb_cc
                     // } else {
                     //     msb_cc
                     // }