We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5dc7f5c commit 684d54cCopy full SHA for 684d54c
src/type-layout.md
@@ -197,6 +197,8 @@ Here is this algorithm described in pseudocode.
197
198
<!-- ignore: pseudocode -->
199
```rust,ignore
200
+/// Returns the amount of padding needed after `offset` to ensure that the
201
+/// following address will be aligned to `alignment`.
202
fn padding_needed_for(offset: usize, alignment: usize) -> usize {
203
let misalignment = offset % alignment;
204
if misalignment > 0 {
0 commit comments