diff --git a/src/interpreter.rs b/src/interpreter.rs index a1db521760..e52aaf37f2 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,