Skip to content

Commit c56ffaa

Browse files
fix now-incorrect parenthetical about byval attr
1 parent 96a7267 commit c56ffaa

File tree

1 file changed

+4
-2
lines changed
  • compiler/rustc_target/src/abi/call

1 file changed

+4
-2
lines changed

Diff for: compiler/rustc_target/src/abi/call/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ pub enum PassMode {
5454
/// argument. (This is the only mode that supports unsized arguments.)
5555
/// `on_stack` defines that the value should be passed at a fixed stack offset in accordance to
5656
/// the ABI rather than passed using a pointer. This corresponds to the `byval` LLVM argument
57-
/// attribute (using the Rust type of this argument). `on_stack` cannot be true for unsized
58-
/// arguments, i.e., when `meta_attrs` is `Some`.
57+
/// attribute (using a byte array type with the same size as the Rust type [which ensures that
58+
/// padding is preserved and that we do not rely on LLVM's struct layout], and with alignment
59+
/// determined in a complex, target-specific manner [see callers of `make_indirect_byval`]).
60+
/// `on_stack` cannot be true for unsized arguments, i.e., when `meta_attrs` is `Some`.
5961
Indirect { attrs: ArgAttributes, meta_attrs: Option<ArgAttributes>, on_stack: bool },
6062
}
6163

0 commit comments

Comments
 (0)