We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
integer_to_ptr_transmutes
1 parent 028f01d commit f685a59Copy full SHA for f685a59
library/core/src/ptr/mod.rs
@@ -914,6 +914,7 @@ pub const fn dangling<T>() -> *const T {
914
#[must_use]
915
#[stable(feature = "strict_provenance", since = "1.84.0")]
916
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
917
+#[allow(integer_to_ptr_transmutes)] // it's the expected sementics here
918
pub const fn without_provenance_mut<T>(addr: usize) -> *mut T {
919
// An int-to-pointer transmute currently has exactly the intended semantics: it creates a
920
// pointer without provenance. Note that this is *not* a stable guarantee about transmute
0 commit comments