1
Fork 0

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.
This commit is contained in:
León Orell Valerian Liehr 2025-03-14 17:26:20 +01:00 committed by GitHub
commit ffa96fe451
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {