From 926bbba459d5f7cd7d15aceba8fe1fbfb069a94b Mon Sep 17 00:00:00 2001 From: Scott Olson Date: Thu, 14 Apr 2016 17:38:52 -0600 Subject: [PATCH] Fix over-long bitshift on 32-bit hosts. Fixes #4. (Hopefully.) --- src/interpreter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpreter.rs b/src/interpreter.rs index a1db521760fb..e52aaf37f2e0 100644 --- a/src/interpreter.rs +++ b/src/interpreter.rs @@ -1001,7 +1001,7 @@ impl<'a, 'tcx: 'a, 'arena> Interpreter<'a, 'tcx, 'arena> { 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,