Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions library/alloc/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ impl CString {
/// assertion is made that `v` contains no 0 bytes, and it requires an
/// actual byte vector, not anything that can be converted to one with Into.
///
/// # Safety
///
/// The caller must ensure `v` contains no nul bytes in its contents.
///
/// # Examples
///
/// ```
Expand Down
9 changes: 9 additions & 0 deletions library/core/src/future/async_drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ pub trait AsyncDrop {
}

/// Async drop.
///
/// # Safety
///
/// The pointer `_to_drop` must be valid for both reads and writes,
/// not only for the duration of this function call,
/// but also until the returned future has completed.
/// See [ptr::drop_in_place] for additional safety concerns.
///
/// [ptr::drop_in_place]: crate::ptr::drop_in_place()
#[unstable(feature = "async_drop", issue = "126482")]
#[lang = "async_drop_in_place"]
pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) {
Expand Down
Loading