Skip to content

Commit

Permalink
Support enum variants in offset_of!
Browse files Browse the repository at this point in the history
  • Loading branch information
GKFX committed Oct 31, 2023
1 parent aed0ed2 commit 03c9acd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ fn codegen_stmt<'tcx>(
NullOp::SizeOf => layout.size.bytes(),
NullOp::AlignOf => layout.align.abi.bytes(),
NullOp::OffsetOf(fields) => {
layout.offset_of_subfield(fx, fields.iter().map(|f| f.index())).bytes()
layout.offset_of_subfield(fx, fields.iter()).bytes()
}
};
let val = CValue::by_val(
Expand Down

0 comments on commit 03c9acd

Please sign in to comment.