Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaybeUninit: remove deprecated functions #59912

Merged
merged 1 commit into from
Apr 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1152,15 +1152,6 @@ impl<T> MaybeUninit<T> {
MaybeUninit { uninit: () }
}

/// Deprecated before stabilization.
#[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)]
// FIXME: still used by stdsimd
Copy link
Contributor

@Centril Centril Apr 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this fixed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this landed with #59556

// #[rustc_deprecated(since = "1.35.0", reason = "use `uninit` instead")]
pub const fn uninitialized() -> MaybeUninit<T> {
Self::uninit()
}

/// Creates a new `MaybeUninit<T>` in an uninitialized state, with the memory being
/// filled with `0` bytes. It depends on `T` whether that already makes for
/// proper initialization. For example, `MaybeUninit<usize>::zeroed()` is initialized,
Expand Down Expand Up @@ -1221,14 +1212,6 @@ impl<T> MaybeUninit<T> {
}
}

/// Deprecated before stabilization.
#[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)]
#[rustc_deprecated(since = "1.35.0", reason = "use `write` instead")]
pub fn set(&mut self, val: T) -> &mut T {
self.write(val)
}

/// Gets a pointer to the contained value. Reading from this pointer or turning it
/// into a reference is undefined behavior unless the `MaybeUninit<T>` is initialized.
///
Expand Down Expand Up @@ -1346,15 +1329,6 @@ impl<T> MaybeUninit<T> {
ManuallyDrop::into_inner(self.value)
}

/// Deprecated before stabilization.
#[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)]
// FIXME: still used by stdsimd
// #[rustc_deprecated(since = "1.35.0", reason = "use `assume_init` instead")]
pub unsafe fn into_initialized(self) -> T {
self.assume_init()
}

/// Reads the value from the `MaybeUninit<T>` container. The resulting `T` is subject
/// to the usual drop handling.
///
Expand Down Expand Up @@ -1417,14 +1391,6 @@ impl<T> MaybeUninit<T> {
self.as_ptr().read()
}

/// Deprecated before stabilization.
#[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)]
#[rustc_deprecated(since = "1.35.0", reason = "use `read` instead")]
pub unsafe fn read_initialized(&self) -> T {
self.read()
}

/// Gets a reference to the contained value.
///
/// # Safety
Expand Down