File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,6 +321,10 @@ impl CString {
321321 /// assertion is made that `v` contains no 0 bytes, and it requires an
322322 /// actual byte vector, not anything that can be converted to one with Into.
323323 ///
324+ /// # Safety
325+ ///
326+ /// The caller must ensure `v` contains no nul bytes in its contents.
327+ ///
324328 /// # Examples
325329 ///
326330 /// ```
Original file line number Diff line number Diff line change @@ -41,6 +41,15 @@ pub trait AsyncDrop {
4141}
4242
4343/// Async drop.
44+ ///
45+ /// # Safety
46+ ///
47+ /// The pointer `_to_drop` must be valid for both reads and writes,
48+ /// not only for the duration of this function call,
49+ /// but also until the returned future has completed.
50+ /// See [ptr::drop_in_place] for additional safety concerns.
51+ ///
52+ /// [ptr::drop_in_place]: crate::ptr::drop_in_place()
4453#[ unstable( feature = "async_drop" , issue = "126482" ) ]
4554#[ lang = "async_drop_in_place" ]
4655pub async unsafe fn async_drop_in_place < T : ?Sized > ( _to_drop : * mut T ) {
You can’t perform that action at this time.
0 commit comments