mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 14:43:24 +00:00
Assign its own tracking issue to Box::into_raw_non_null
https://github.com/rust-lang/rust/issues/47336
This commit is contained in:
parent
76b686f78d
commit
602a445b92
@ -317,12 +317,14 @@ impl<T: ?Sized> Box<T> {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
/// #![feature(box_into_raw_non_null)]
|
||||||
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// let x = Box::new(5);
|
/// let x = Box::new(5);
|
||||||
/// let ptr = Box::into_raw_non_null(x);
|
/// let ptr = Box::into_raw_non_null(x);
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "nonnull", issue = "27730")]
|
#[unstable(feature = "box_into_raw_non_null", issue = "47336")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn into_raw_non_null(b: Box<T>) -> NonNull<T> {
|
pub fn into_raw_non_null(b: Box<T>) -> NonNull<T> {
|
||||||
Box::into_unique(b).into()
|
Box::into_unique(b).into()
|
||||||
|
@ -84,6 +84,7 @@
|
|||||||
#![cfg_attr(test, feature(rand, test))]
|
#![cfg_attr(test, feature(rand, test))]
|
||||||
#![feature(allow_internal_unstable)]
|
#![feature(allow_internal_unstable)]
|
||||||
#![feature(ascii_ctype)]
|
#![feature(ascii_ctype)]
|
||||||
|
#![feature(box_into_raw_non_null)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(cfg_target_has_atomic)]
|
#![feature(cfg_target_has_atomic)]
|
||||||
|
Loading…
Reference in New Issue
Block a user