Stabilize const_ptr_read
This commit is contained in:
parent
4a18324a4d
commit
81c2459af6
17 changed files with 35 additions and 42 deletions
|
@ -1195,7 +1195,7 @@ impl<T: ?Sized> *const T {
|
|||
///
|
||||
/// [`ptr::read`]: crate::ptr::read()
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_read", issue = "80377")]
|
||||
#[rustc_const_stable(feature = "const_ptr_read", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[inline]
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
pub const unsafe fn read(self) -> T
|
||||
|
@ -1236,7 +1236,7 @@ impl<T: ?Sized> *const T {
|
|||
///
|
||||
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_read", issue = "80377")]
|
||||
#[rustc_const_stable(feature = "const_ptr_read", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[inline]
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
pub const unsafe fn read_unaligned(self) -> T
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue