]> git.lizzy.rs Git - rust.git/commitdiff
Fix over-long bitshift on 32-bit hosts.
authorScott Olson <scott@solson.me>
Thu, 14 Apr 2016 23:38:52 +0000 (17:38 -0600)
committerScott Olson <scott@solson.me>
Thu, 14 Apr 2016 23:39:06 +0000 (17:39 -0600)
Fixes #4. (Hopefully.)

src/interpreter.rs

index a1db521760fbe1a55f1a8ae9e631b01e04229512..e52aaf37f2e0afb56f090d69aab4ef930fc6d099 100644 (file)
@@ -1001,7 +1001,7 @@ fn make_aggregate_repr<V>(&self, variant_fields: V) -> Repr
             variants.push(fields);
         }
 
-        let discr_size = match variants.len() {
+        let discr_size = match variants.len() as u64 {
             n if n <= 1       => 0,
             n if n <= 1 << 8  => 1,
             n if n <= 1 << 16 => 2,