Skip to content

Commit e26692d

Browse files
committed
Add a useful comment.
1 parent baa16d2 commit e26692d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_mir_transform/src/large_enums.rs

+2
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ impl EnumSizeOpt {
244244
let ptr_sized_int = data_layout.ptr_sized_integer();
245245
let target_bytes = ptr_sized_int.size().bytes() as usize;
246246
let mut data = vec![0; target_bytes * num_discrs];
247+
248+
// We use a macro because `$bytes` can be u32 or u64.
247249
macro_rules! encode_store {
248250
($curr_idx: expr, $endian: expr, $bytes: expr) => {
249251
let bytes = match $endian {

0 commit comments

Comments
 (0)