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
1 changed files with 2 additions and 2 deletions
|
@ -64,7 +64,7 @@ impl<T> ManuallyDrop<T> {
|
||||||
/// ```
|
/// ```
|
||||||
#[must_use = "if you don't need the wrapper, you can use `mem::forget` instead"]
|
#[must_use = "if you don't need the wrapper, you can use `mem::forget` instead"]
|
||||||
#[stable(feature = "manually_drop", since = "1.20.0")]
|
#[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)]
|
#[inline(always)]
|
||||||
pub const fn new(value: T) -> ManuallyDrop<T> {
|
pub const fn new(value: T) -> ManuallyDrop<T> {
|
||||||
ManuallyDrop { value }
|
ManuallyDrop { value }
|
||||||
|
@ -82,7 +82,7 @@ impl<T> ManuallyDrop<T> {
|
||||||
/// let _: Box<()> = ManuallyDrop::into_inner(x); // This drops the `Box`.
|
/// let _: Box<()> = ManuallyDrop::into_inner(x); // This drops the `Box`.
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "manually_drop", since = "1.20.0")]
|
#[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)]
|
#[inline(always)]
|
||||||
pub const fn into_inner(slot: ManuallyDrop<T>) -> T {
|
pub const fn into_inner(slot: ManuallyDrop<T>) -> T {
|
||||||
slot.value
|
slot.value
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue