diff options
| author | Lukas Markeffsky <@> | 2022-10-20 19:46:31 +0200 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2022-11-19 16:47:42 +0100 |
| commit | 24e88066dc702da8fbe0381044645a91669bf02f (patch) | |
| tree | 164154a369eec7e18c8a3c639129655138cbfa04 | |
| parent | 2ef9a8ae0fed0a92b86b316f98f3467aef1e547c (diff) | |
| download | rust-24e88066dc702da8fbe0381044645a91669bf02f.tar.gz rust-24e88066dc702da8fbe0381044645a91669bf02f.zip | |
mark `align_offset` as `#[must_use]`
| -rw-r--r-- | library/core/src/ptr/const_ptr.rs | 1 | ||||
| -rw-r--r-- | library/core/src/ptr/mut_ptr.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 8b96cf06be4..cedf58c27ff 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -1320,6 +1320,7 @@ impl<T: ?Sized> *const T { /// } /// # } /// ``` + #[must_use] #[stable(feature = "align_offset", since = "1.36.0")] #[rustc_const_unstable(feature = "const_align_offset", issue = "90962")] #[cfg(not(bootstrap))] diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index 2d73c24b5b4..21c836efd5c 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -1588,6 +1588,7 @@ impl<T: ?Sized> *mut T { /// } /// # } /// ``` + #[must_use] #[stable(feature = "align_offset", since = "1.36.0")] #[rustc_const_unstable(feature = "const_align_offset", issue = "90962")] #[cfg(not(bootstrap))] |
