mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-04 20:04:17 +00:00
stabilized needs_drop (fixes #41890)
This commit is contained in:
parent
ae8efdc87d
commit
04855950b9
@ -28,7 +28,6 @@
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(dropck_eyepatch)]
|
||||
#![feature(generic_param_attrs)]
|
||||
#![feature(needs_drop)]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
|
||||
#![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:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(needs_drop)]
|
||||
/// use std::{mem, ptr};
|
||||
///
|
||||
/// pub struct MyCollection<T> {
|
||||
@ -359,7 +358,7 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
|
||||
/// }
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "needs_drop", issue = "41890")]
|
||||
#[stable(feature = "needs_drop", since = "1.22.0")]
|
||||
pub fn needs_drop<T>() -> bool {
|
||||
unsafe { intrinsics::needs_drop::<T>() }
|
||||
}
|
||||
|
@ -276,7 +276,6 @@
|
||||
#![feature(macro_reexport)]
|
||||
#![feature(macro_vis_matcher)]
|
||||
#![feature(needs_panic_runtime)]
|
||||
#![feature(needs_drop)]
|
||||
#![feature(never_type)]
|
||||
#![feature(num_bits_bytes)]
|
||||
#![feature(old_wrapping)]
|
||||
|
Loading…
Reference in New Issue
Block a user