Skip to content

Commit 54b6e74

Browse files
committed
Make the MaybeUninit array consist of bytes
1 parent c666894 commit 54b6e74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_transform/src/check_enums.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ fn insert_discr_cast_to_u128<'tcx>(
263263
} else if discriminant_size.bytes() < op_size.bytes() {
264264
// The discriminant is less wide than the operand, cast the operand into
265265
// [MaybeUninit; N] and then index into it.
266-
let mu = Ty::new_maybe_uninit(tcx, discriminant_ty);
266+
let mu = Ty::new_maybe_uninit(tcx, tcx.types.u8);
267267
let array_len = op_size.bytes();
268268
let mu_array_ty = Ty::new_array(tcx, mu, array_len);
269269
let mu_array =

0 commit comments

Comments
 (0)