Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Apply docs suggestions from review
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
  • Loading branch information
SimonSapin and Centril committed Nov 7, 2019
commit 05c14bcc3180092ec4c03d59977abf96db7b4b7a
8 changes: 4 additions & 4 deletions src/libcore/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,11 @@ impl<T> MaybeUninit<T> {
&mut *self.value
}

/// Get a slice of assume-initialized items.
/// Assuming all the elements are initialized, get a slice to them.
///
/// # Safety
///
/// It is up to the caller to guarantee that the `MaybeUninit<T>` items
/// It is up to the caller to guarantee that the `MaybeUninit<T>` elements
/// really are in an initialized state.
/// Calling this when the content is not yet fully initialized causes undefined behavior.
#[unstable(feature = "maybe_uninit_slice_assume_init", issue = "0")]
Expand All @@ -734,11 +734,11 @@ impl<T> MaybeUninit<T> {
&*(slice as *const [Self] as *const [T])
}

/// Get a mutable slice of assume-initialized items.
/// Assuming all the elements are initialized, get a mutable slice to them.
///
/// # Safety
///
/// It is up to the caller to guarantee that the `MaybeUninit<T>` items
/// It is up to the caller to guarantee that the `MaybeUninit<T>` elements
/// really are in an initialized state.
/// Calling this when the content is not yet fully initialized causes undefined behavior.
#[unstable(feature = "maybe_uninit_slice_assume_init", issue = "0")]
Expand Down