diff options
| author | Ralf Jung <post@ralfj.de> | 2022-11-06 14:15:20 +0100 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2023-02-28 19:22:27 -0500 |
| commit | 5378b465f0fcb3c675950157cfc17c1ebf58295c (patch) | |
| tree | 835dd3fca52d666a610672119cd5d90de41cbf09 | |
| parent | fb747d0e24a38422d7b7f6b9372dd2ecfe6f408f (diff) | |
| download | rust-5378b465f0fcb3c675950157cfc17c1ebf58295c.tar.gz rust-5378b465f0fcb3c675950157cfc17c1ebf58295c.zip | |
fix cranelift and gcc
| -rw-r--r-- | src/consts.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/consts.rs b/src/consts.rs index be50850d82f..7ffb345df9b 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -279,12 +279,12 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { pub fn const_alloc_to_gcc<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, alloc: ConstAllocation<'tcx>) -> RValue<'gcc> { let alloc = alloc.inner(); - let mut llvals = Vec::with_capacity(alloc.provenance().len() + 1); + let mut llvals = Vec::with_capacity(alloc.provenance().ptrs().len() + 1); let dl = cx.data_layout(); let pointer_size = dl.pointer_size.bytes() as usize; let mut next_offset = 0; - for &(offset, alloc_id) in alloc.provenance().iter() { + for &(offset, alloc_id) in alloc.provenance().ptrs().iter() { let offset = offset.bytes(); assert_eq!(offset as usize as u64, offset); let offset = offset as usize; |
