about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-03-14 17:26:20 +0100
committerGitHub <noreply@github.com>2025-03-14 17:26:20 +0100
commitffa96fe451824e02065faac036f871ba2cb36cae (patch)
tree1e9c850d7782e76de11fab8635aad050480c45a2
parent881d237cd9e52b6d3b1d7f7a47b2b603af1e21c4 (diff)
parentb06a1364f443e7edbfeba1b899a91031077c10b7 (diff)
downloadrust-ffa96fe451824e02065faac036f871ba2cb36cae.tar.gz
rust-ffa96fe451824e02065faac036f871ba2cb36cae.zip
Rollup merge of #138353 - RalfJung:expose-provenance-must-use, r=ibraheemdev
remove must_use from <*const T>::expose_provenance

`<*mut T>::expose_provenance` does not have this attribute, and in fact the function is documented to have a side-effect, so there are perfectly legitimate use-cases where the return value would be ignored.
-rw-r--r--library/core/src/ptr/const_ptr.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs
index 9a4f916803e..7d0839aff3f 100644
--- a/library/core/src/ptr/const_ptr.rs
+++ b/library/core/src/ptr/const_ptr.rs
@@ -193,7 +193,6 @@ impl<T: ?Sized> *const T {
     /// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
     ///
     /// [`with_exposed_provenance`]: with_exposed_provenance
-    #[must_use]
     #[inline(always)]
     #[stable(feature = "exposed_provenance", since = "1.84.0")]
     pub fn expose_provenance(self) -> usize {