diff options
| author | Ralf Jung <post@ralfj.de> | 2022-11-06 14:15:20 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-11-06 14:17:10 +0100 |
| commit | eb4bdb00a4e1d881eaadc6254824bb0631950c5b (patch) | |
| tree | a951eb3e7dda9bf24683f50f82d7bb8b04954e63 /compiler/rustc_codegen_gcc/src | |
| parent | 3db45f00ff9411163b1365f46c34b8f8a7138a58 (diff) | |
| download | rust-eb4bdb00a4e1d881eaadc6254824bb0631950c5b.tar.gz rust-eb4bdb00a4e1d881eaadc6254824bb0631950c5b.zip | |
fix cranelift and gcc
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/consts.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_gcc/src/consts.rs b/compiler/rustc_codegen_gcc/src/consts.rs index 81f53328867..111bfeb1322 100644 --- a/compiler/rustc_codegen_gcc/src/consts.rs +++ b/compiler/rustc_codegen_gcc/src/consts.rs @@ -297,12 +297,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; |
