Skip to content

Commit 1ce6645

Browse files
committed
MaybeUninit: remove deprecated functions
1 parent 2226c09 commit 1ce6645

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/libcore/mem.rs

-34
Original file line numberDiff line numberDiff line change
@@ -1152,15 +1152,6 @@ impl<T> MaybeUninit<T> {
11521152
MaybeUninit { uninit: () }
11531153
}
11541154

1155-
/// Deprecated before stabilization.
1156-
#[unstable(feature = "maybe_uninit", issue = "53491")]
1157-
#[inline(always)]
1158-
// FIXME: still used by stdsimd
1159-
// #[rustc_deprecated(since = "1.35.0", reason = "use `uninit` instead")]
1160-
pub const fn uninitialized() -> MaybeUninit<T> {
1161-
Self::uninit()
1162-
}
1163-
11641155
/// Creates a new `MaybeUninit<T>` in an uninitialized state, with the memory being
11651156
/// filled with `0` bytes. It depends on `T` whether that already makes for
11661157
/// proper initialization. For example, `MaybeUninit<usize>::zeroed()` is initialized,
@@ -1221,14 +1212,6 @@ impl<T> MaybeUninit<T> {
12211212
}
12221213
}
12231214

1224-
/// Deprecated before stabilization.
1225-
#[unstable(feature = "maybe_uninit", issue = "53491")]
1226-
#[inline(always)]
1227-
#[rustc_deprecated(since = "1.35.0", reason = "use `write` instead")]
1228-
pub fn set(&mut self, val: T) -> &mut T {
1229-
self.write(val)
1230-
}
1231-
12321215
/// Gets a pointer to the contained value. Reading from this pointer or turning it
12331216
/// into a reference is undefined behavior unless the `MaybeUninit<T>` is initialized.
12341217
///
@@ -1346,15 +1329,6 @@ impl<T> MaybeUninit<T> {
13461329
ManuallyDrop::into_inner(self.value)
13471330
}
13481331

1349-
/// Deprecated before stabilization.
1350-
#[unstable(feature = "maybe_uninit", issue = "53491")]
1351-
#[inline(always)]
1352-
// FIXME: still used by stdsimd
1353-
// #[rustc_deprecated(since = "1.35.0", reason = "use `assume_init` instead")]
1354-
pub unsafe fn into_initialized(self) -> T {
1355-
self.assume_init()
1356-
}
1357-
13581332
/// Reads the value from the `MaybeUninit<T>` container. The resulting `T` is subject
13591333
/// to the usual drop handling.
13601334
///
@@ -1417,14 +1391,6 @@ impl<T> MaybeUninit<T> {
14171391
self.as_ptr().read()
14181392
}
14191393

1420-
/// Deprecated before stabilization.
1421-
#[unstable(feature = "maybe_uninit", issue = "53491")]
1422-
#[inline(always)]
1423-
#[rustc_deprecated(since = "1.35.0", reason = "use `read` instead")]
1424-
pub unsafe fn read_initialized(&self) -> T {
1425-
self.read()
1426-
}
1427-
14281394
/// Gets a reference to the contained value.
14291395
///
14301396
/// # Safety

0 commit comments

Comments
 (0)