stabilized needs_drop (fixes #41890)
This commit is contained in:
parent
ae8efdc87d
commit
04855950b9
|
@ -28,7 +28,6 @@
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(dropck_eyepatch)]
|
#![feature(dropck_eyepatch)]
|
||||||
#![feature(generic_param_attrs)]
|
#![feature(generic_param_attrs)]
|
||||||
#![feature(needs_drop)]
|
|
||||||
#![cfg_attr(test, feature(test))]
|
#![cfg_attr(test, feature(test))]
|
||||||
|
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
|
@ -332,7 +332,6 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
|
||||||
/// Here's an example of how a collection might make use of needs_drop:
|
/// Here's an example of how a collection might make use of needs_drop:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(needs_drop)]
|
|
||||||
/// use std::{mem, ptr};
|
/// use std::{mem, ptr};
|
||||||
///
|
///
|
||||||
/// pub struct MyCollection<T> {
|
/// pub struct MyCollection<T> {
|
||||||
|
@ -359,7 +358,7 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "needs_drop", issue = "41890")]
|
#[stable(feature = "needs_drop", since = "1.22.0")]
|
||||||
pub fn needs_drop<T>() -> bool {
|
pub fn needs_drop<T>() -> bool {
|
||||||
unsafe { intrinsics::needs_drop::<T>() }
|
unsafe { intrinsics::needs_drop::<T>() }
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,7 +276,6 @@
|
||||||
#![feature(macro_reexport)]
|
#![feature(macro_reexport)]
|
||||||
#![feature(macro_vis_matcher)]
|
#![feature(macro_vis_matcher)]
|
||||||
#![feature(needs_panic_runtime)]
|
#![feature(needs_panic_runtime)]
|
||||||
#![feature(needs_drop)]
|
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![feature(num_bits_bytes)]
|
#![feature(num_bits_bytes)]
|
||||||
#![feature(old_wrapping)]
|
#![feature(old_wrapping)]
|
||||||
|
|
Loading…
Reference in New Issue