Skip to content

Commit 03c9acd

Browse files
committed
Support enum variants in offset_of!
1 parent aed0ed2 commit 03c9acd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ fn codegen_stmt<'tcx>(
766766
NullOp::SizeOf => layout.size.bytes(),
767767
NullOp::AlignOf => layout.align.abi.bytes(),
768768
NullOp::OffsetOf(fields) => {
769-
layout.offset_of_subfield(fx, fields.iter().map(|f| f.index())).bytes()
769+
layout.offset_of_subfield(fx, fields.iter()).bytes()
770770
}
771771
};
772772
let val = CValue::by_val(

0 commit comments

Comments
 (0)