Rollup merge of #130822 - bjoernager:non-null-from-ref, r=dtolnay
Add `from_ref` and `from_mut` constructors to `core::ptr::NonNull`. Relevant tracking issue: #130823 The `core::ptr::NonNull` type should have the convenience constructors `from_ref` and `from_mut` for parity with `core::ptr::from_ref` and `core::ptr::from_mut`. Although the type in question already implements `From<&T>` and `From<&mut T>`, these new functions also carry the ability to be used in constant expressions (due to not being behind a trait).
This commit is contained in:
@@ -153,6 +153,7 @@
|
||||
#![feature(isqrt)]
|
||||
#![feature(lazy_get)]
|
||||
#![feature(link_cfg)]
|
||||
#![feature(non_null_from_ref)]
|
||||
#![feature(offset_of_enum)]
|
||||
#![feature(panic_internals)]
|
||||
#![feature(ptr_alignment_type)]
|
||||
|
||||
Reference in New Issue
Block a user