mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 05:51:58 +00:00
library: Stabilize const_ptr_as_ref
Const-stabilizes: - `NonNull::as_mut`
This commit is contained in:
parent
bcc78bdc29
commit
966405d107
@ -140,7 +140,6 @@
|
||||
#![feature(const_option_ext)]
|
||||
#![feature(const_pin)]
|
||||
#![feature(const_pointer_is_aligned)]
|
||||
#![feature(const_ptr_as_ref)]
|
||||
#![feature(const_ptr_is_null)]
|
||||
#![feature(const_ptr_sub_ptr)]
|
||||
#![feature(const_ptr_write)]
|
||||
|
@ -394,7 +394,8 @@ impl<T: ?Sized> NonNull<T> {
|
||||
///
|
||||
/// [the module documentation]: crate::ptr#safety
|
||||
#[stable(feature = "nonnull", since = "1.25.0")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
|
||||
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
|
||||
#[rustc_const_stable(feature = "const_ptr_as_ref", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[must_use]
|
||||
#[inline(always)]
|
||||
pub const unsafe fn as_mut<'a>(&mut self) -> &'a mut T {
|
||||
|
@ -30,7 +30,6 @@
|
||||
#![feature(const_option_ext)]
|
||||
#![feature(const_pin)]
|
||||
#![feature(const_pointer_is_aligned)]
|
||||
#![feature(const_ptr_as_ref)]
|
||||
#![feature(const_ptr_write)]
|
||||
#![feature(const_result)]
|
||||
#![feature(const_slice_from_ref)]
|
||||
|
Loading…
Reference in New Issue
Block a user