about summary refs log tree commit diff
path: root/library/core/src/alloc
diff options
context:
space:
mode:
authorJohn Kugelman <john@kugelman.name>2021-10-10 18:22:40 -0400
committerJohn Kugelman <john@kugelman.name>2021-10-10 19:00:33 -0400
commitcf2bcd10ed28b169b8df74383c2a35a4ffbdcf40 (patch)
tree87acd2edbff6d167abc4e8e70c702da9b9e350fa /library/core/src/alloc
parent6928fafe06e4ab29317f75194e1bf67c119dccdc (diff)
downloadrust-cf2bcd10ed28b169b8df74383c2a35a4ffbdcf40.tar.gz
rust-cf2bcd10ed28b169b8df74383c2a35a4ffbdcf40.zip
Add #[must_use] to from_value conversions
Diffstat (limited to 'library/core/src/alloc')
-rw-r--r--library/core/src/alloc/layout.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs
index ccf6e420de7..8086dd35730 100644
--- a/library/core/src/alloc/layout.rs
+++ b/library/core/src/alloc/layout.rs
@@ -94,6 +94,7 @@ impl Layout {
     /// [`Layout::from_size_align`].
     #[stable(feature = "alloc_layout", since = "1.28.0")]
     #[rustc_const_stable(feature = "alloc_layout", since = "1.36.0")]
+    #[must_use]
     #[inline]
     pub const unsafe fn from_size_align_unchecked(size: usize, align: usize) -> Self {
         // SAFETY: the caller must ensure that `align` is greater than zero.