diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-10-14 13:48:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-14 13:48:18 +0200 |
| commit | 38999570863b2adc4598f1b949ff4e8fe53d4866 (patch) | |
| tree | 0f744b1a13e6c814192af136fb05d4c398900558 | |
| parent | 139f63a6eba2b7a10462e1c9f0ef396b01e524f5 (diff) | |
| parent | a9b0966aa5593cf3419aae255b7ca8a85509e33e (diff) | |
| download | rust-38999570863b2adc4598f1b949ff4e8fe53d4866.tar.gz rust-38999570863b2adc4598f1b949ff4e8fe53d4866.zip | |
Rollup merge of #115653 - joshlf:patch-9, r=dtolnay
Guarantee that Layout::align returns a non-zero power of two
| -rw-r--r-- | library/core/src/alloc/layout.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs index 59730303734..65946e09ff9 100644 --- a/library/core/src/alloc/layout.rs +++ b/library/core/src/alloc/layout.rs @@ -130,6 +130,8 @@ impl Layout { } /// The minimum byte alignment for a memory block of this layout. + /// + /// The returned alignment is guaranteed to be a power of two. #[stable(feature = "alloc_layout", since = "1.28.0")] #[rustc_const_stable(feature = "const_alloc_layout_size_align", since = "1.50.0")] #[must_use = "this returns the minimum alignment, \ |
