Skip to content

Commit 1e956e8

Browse files
authored
Rollup merge of rust-lang#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.
2 parents 0b766fc + 22e5fde commit 1e956e8

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

core/src/ptr/const_ptr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ impl<T: ?Sized> *const T {
193193
/// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
194194
///
195195
/// [`with_exposed_provenance`]: with_exposed_provenance
196-
#[must_use]
197196
#[inline(always)]
198197
#[stable(feature = "exposed_provenance", since = "1.84.0")]
199198
pub fn expose_provenance(self) -> usize {

0 commit comments

Comments
 (0)