Rollup merge of #61006 - RalfJung:maybe-uninit, r=Centril

adjust deprecation date of mem::uninitialized

In https://github.com/rust-lang/rust/pull/60445 we [decided](https://github.com/rust-lang/rust/pull/60445#issuecomment-488626308) that we'd deprecate for 1.38 instead of 1.40, but I forgot to adjust for that.
This commit is contained in:
Mazdak Farrokhzad 2019-05-22 03:47:43 +02:00 committed by GitHub
commit 2551a54af1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -466,7 +466,7 @@ pub unsafe fn zeroed<T>() -> T {
/// [`MaybeUninit<T>`]: union.MaybeUninit.html /// [`MaybeUninit<T>`]: union.MaybeUninit.html
/// [inv]: union.MaybeUninit.html#initialization-invariant /// [inv]: union.MaybeUninit.html#initialization-invariant
#[inline] #[inline]
#[rustc_deprecated(since = "1.40.0", reason = "use `mem::MaybeUninit` instead")] #[rustc_deprecated(since = "1.38.0", reason = "use `mem::MaybeUninit` instead")]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub unsafe fn uninitialized<T>() -> T { pub unsafe fn uninitialized<T>() -> T {
intrinsics::panic_if_uninhabited::<T>(); intrinsics::panic_if_uninhabited::<T>();