diff options
| author | George Bateman <george.bateman16@gmail.com> | 2023-08-15 20:10:45 +0100 |
|---|---|---|
| committer | George Bateman <george.bateman16@gmail.com> | 2023-10-31 23:25:54 +0000 |
| commit | e936416a8d3cfb501504f00d7250d5b595fed244 (patch) | |
| tree | c0dd8196372db8a77ae1a90d38d87b630658e90e /compiler/rustc_codegen_cranelift | |
| parent | 9d83ac217957eece2189eccf4a7232caec7232ee (diff) | |
| download | rust-e936416a8d3cfb501504f00d7250d5b595fed244.tar.gz rust-e936416a8d3cfb501504f00d7250d5b595fed244.zip | |
Support enum variants in offset_of!
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/base.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index 80e7c5bd9ed..91b1547cb6e 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -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( |
