Support enum variants in offset_of! · rust-lang/rust@03c9acd (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 03c9acd
Support enum variants in offset_of!
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -766,7 +766,7 @@ fn codegen_stmt<'tcx>( | ||
766 | 766 | NullOp::SizeOf => layout.size.bytes(), |
767 | 767 | NullOp::AlignOf => layout.align.abi.bytes(), |
768 | 768 | NullOp::OffsetOf(fields) => { |
769 | - layout.offset_of_subfield(fx, fields.iter().map(|f | |
769 | + layout.offset_of_subfield(fx, fields.iter()).bytes() | |
770 | 770 | } |
771 | 771 | }; |
772 | 772 | let val = CValue::by_val( |