about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-02 20:09:25 +0000
committerbors <bors@rust-lang.org>2024-07-02 20:09:25 +0000
commit6292b2af620dbd771ebb687c3a93c69ba8f97268 (patch)
treedcea8719fe1a4b62525508c047ee75a412d85e9a /compiler/rustc_codegen_llvm/src
parent49ff3909fbd499218a28a31d3a33e88365496a55 (diff)
parent6407580aab344a5a0066f44ced2af0c697b9b4c8 (diff)
downloadrust-6292b2af620dbd771ebb687c3a93c69ba8f97268.tar.gz
rust-6292b2af620dbd771ebb687c3a93c69ba8f97268.zip
Auto merge of #127244 - matthiaskrgr:rollup-px1vahe, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #126883 (Parenthesize break values containing leading label)
 - #127136 (Fix `FnMut::call_mut`/`Fn::call` shim for async closures that capture references)
 - #127146 (Uplift fast rejection to new solver)
 - #127152 (Bootstrap: Try renaming the file if removing fails)
 - #127168 (Use the aligned size for alloca at args/ret when the pass mode is cast)
 - #127203 (Fix import suggestion error when path segment failed not from starting)
 - #127212 (Update books)
 - #127224 (Make `FloatTy` checks exhaustive in pretty print)
 - #127230 (chore: remove duplicate words)
 - #127243 (Add test for adt_const_params)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/abi.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs
index a6a3f0f9646..d034f9b5256 100644
--- a/compiler/rustc_codegen_llvm/src/abi.rs
+++ b/compiler/rustc_codegen_llvm/src/abi.rs
@@ -226,7 +226,8 @@ impl<'ll, 'tcx> ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
                 //   when passed by value, making it smaller.
                 // - On some ABIs, the Rust layout { u16, u16, u16 } may be padded up to 8 bytes
                 //   when passed by value, making it larger.
-                let copy_bytes = cmp::min(scratch_size.bytes(), self.layout.size.bytes());
+                let copy_bytes =
+                    cmp::min(cast.unaligned_size(bx).bytes(), self.layout.size.bytes());
                 // Allocate some scratch space...
                 let llscratch = bx.alloca(scratch_size, scratch_align);
                 bx.lifetime_start(llscratch, scratch_size);