mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 05:51:58 +00:00
Rollup merge of #91796 - not-my-profile:fix-const_manually_drop-since, r=kennytm
Fix since attribute for const_manually_drop feature const_manually_drop was stabilized in 1.32 as mentioned in https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1320-2019-01-17
This commit is contained in:
commit
95d8aadcfc
@ -64,7 +64,7 @@ impl<T> ManuallyDrop<T> {
|
||||
/// ```
|
||||
#[must_use = "if you don't need the wrapper, you can use `mem::forget` instead"]
|
||||
#[stable(feature = "manually_drop", since = "1.20.0")]
|
||||
#[rustc_const_stable(feature = "const_manually_drop", since = "1.36.0")]
|
||||
#[rustc_const_stable(feature = "const_manually_drop", since = "1.32.0")]
|
||||
#[inline(always)]
|
||||
pub const fn new(value: T) -> ManuallyDrop<T> {
|
||||
ManuallyDrop { value }
|
||||
@ -82,7 +82,7 @@ impl<T> ManuallyDrop<T> {
|
||||
/// let _: Box<()> = ManuallyDrop::into_inner(x); // This drops the `Box`.
|
||||
/// ```
|
||||
#[stable(feature = "manually_drop", since = "1.20.0")]
|
||||
#[rustc_const_stable(feature = "const_manually_drop", since = "1.36.0")]
|
||||
#[rustc_const_stable(feature = "const_manually_drop", since = "1.32.0")]
|
||||
#[inline(always)]
|
||||
pub const fn into_inner(slot: ManuallyDrop<T>) -> T {
|
||||
slot.value
|
||||
|
Loading…
Reference in New Issue
Block a user