We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c076954 commit 2c3c882Copy full SHA for 2c3c882
src/libcore/mem.rs
@@ -483,6 +483,7 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
483
/// ```
484
#[inline]
485
#[stable(feature = "needs_drop", since = "1.21.0")]
486
+#[rustc_const_unstable(feature = "const_needs_drop")]
487
#[cfg(not(stage0))]
488
pub const fn needs_drop<T>() -> bool {
489
intrinsics::needs_drop::<T>()
src/test/run-pass/const-needs_drop.rs
@@ -8,6 +8,8 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
+#![feature(const_needs_drop)]
12
+
13
use std::mem;
14
15
struct Trivial(u8, f32);
0 commit comments