Rollup merge of #145462 - Kivooeo:stabilize-const_exposed_provenance, r=RalfJung
Stabilize `const_exposed_provenance` feature This closes [tracking issue](https://github.com/rust-lang/rust/issues/144538) and stabilises `fn with_exposed_provenance` and `fn with_exposed_provenance_mut` in const
This commit is contained in:
commit
2a9bb562ff
1 changed files with 2 additions and 2 deletions
|
|
@ -974,7 +974,7 @@ pub const fn dangling_mut<T>() -> *mut T {
|
|||
#[must_use]
|
||||
#[inline(always)]
|
||||
#[stable(feature = "exposed_provenance", since = "1.84.0")]
|
||||
#[rustc_const_unstable(feature = "const_exposed_provenance", issue = "144538")]
|
||||
#[rustc_const_stable(feature = "const_exposed_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
#[allow(fuzzy_provenance_casts)] // this *is* the explicit provenance API one should use instead
|
||||
pub const fn with_exposed_provenance<T>(addr: usize) -> *const T {
|
||||
|
|
@ -1015,7 +1015,7 @@ pub const fn with_exposed_provenance<T>(addr: usize) -> *const T {
|
|||
#[must_use]
|
||||
#[inline(always)]
|
||||
#[stable(feature = "exposed_provenance", since = "1.84.0")]
|
||||
#[rustc_const_unstable(feature = "const_exposed_provenance", issue = "144538")]
|
||||
#[rustc_const_stable(feature = "const_exposed_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
#[allow(fuzzy_provenance_casts)] // this *is* the explicit provenance API one should use instead
|
||||
pub const fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue