Gate const core::mem::needs_drop behind const_needs_drop
This commit is contained in:
parent
c0769545b0
commit
2c3c8822e0
@ -483,6 +483,7 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "needs_drop", since = "1.21.0")]
|
||||
#[rustc_const_unstable(feature = "const_needs_drop")]
|
||||
#[cfg(not(stage0))]
|
||||
pub const fn needs_drop<T>() -> bool {
|
||||
intrinsics::needs_drop::<T>()
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(const_needs_drop)]
|
||||
|
||||
use std::mem;
|
||||
|
||||
struct Trivial(u8, f32);
|
||||
|
Loading…
x
Reference in New Issue
Block a user