mark align_offset as #[must_use]

This commit is contained in:
Lukas Markeffsky 2022-10-20 19:46:31 +02:00
parent 2ef9a8ae0f
commit 24e88066dc
2 changed files with 2 additions and 0 deletions

View file

@ -1320,6 +1320,7 @@ pub unsafe fn read_volatile(self) -> T
/// }
/// # }
/// ```
#[must_use]
#[stable(feature = "align_offset", since = "1.36.0")]
#[rustc_const_unstable(feature = "const_align_offset", issue = "90962")]
#[cfg(not(bootstrap))]

View file

@ -1588,6 +1588,7 @@ pub unsafe fn replace(self, src: T) -> T
/// }
/// # }
/// ```
#[must_use]
#[stable(feature = "align_offset", since = "1.36.0")]
#[rustc_const_unstable(feature = "const_align_offset", issue = "90962")]
#[cfg(not(bootstrap))]