Allow integer_to_ptr_transmutes in core
This commit is contained in:
parent
d4cbd9a440
commit
f25bf37f1f
1 changed files with 1 additions and 0 deletions
|
|
@ -914,6 +914,7 @@ pub const fn dangling<T>() -> *const T {
|
|||
#[must_use]
|
||||
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
#[allow(integer_to_ptr_transmutes)] // Expected semantics here.
|
||||
pub const fn without_provenance_mut<T>(addr: usize) -> *mut T {
|
||||
// An int-to-pointer transmute currently has exactly the intended semantics: it creates a
|
||||
// pointer without provenance. Note that this is *not* a stable guarantee about transmute
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue