From c56ffaa3af2647838c25c6e1afbfef9309710929 Mon Sep 17 00:00:00 2001 From: Erik Desjardins Date: Thu, 7 Mar 2024 09:56:27 -0500 Subject: [PATCH] fix now-incorrect parenthetical about byval attr --- compiler/rustc_target/src/abi/call/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_target/src/abi/call/mod.rs b/compiler/rustc_target/src/abi/call/mod.rs index 66177d551ba..6e24dc4bc0b 100644 --- a/compiler/rustc_target/src/abi/call/mod.rs +++ b/compiler/rustc_target/src/abi/call/mod.rs @@ -54,8 +54,10 @@ pub enum PassMode { /// argument. (This is the only mode that supports unsized arguments.) /// `on_stack` defines that the value should be passed at a fixed stack offset in accordance to /// the ABI rather than passed using a pointer. This corresponds to the `byval` LLVM argument - /// attribute (using the Rust type of this argument). `on_stack` cannot be true for unsized - /// arguments, i.e., when `meta_attrs` is `Some`. + /// attribute (using a byte array type with the same size as the Rust type [which ensures that + /// padding is preserved and that we do not rely on LLVM's struct layout], and with alignment + /// determined in a complex, target-specific manner [see callers of `make_indirect_byval`]). + /// `on_stack` cannot be true for unsized arguments, i.e., when `meta_attrs` is `Some`. Indirect { attrs: ArgAttributes, meta_attrs: Option, on_stack: bool }, }