about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/alloc/src/ffi/c_str.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/ffi/c_str.rs b/library/alloc/src/ffi/c_str.rs
index 4a4a3abd47f..9419b0cfb24 100644
--- a/library/alloc/src/ffi/c_str.rs
+++ b/library/alloc/src/ffi/c_str.rs
@@ -1024,6 +1024,8 @@ impl ToOwned for CStr {
 
 #[stable(feature = "cstring_asref", since = "1.7.0")]
 impl From<&CStr> for CString {
+    /// Converts a <code>&[CStr]</code> into a [`CString`]
+    /// by copying the contents into a new allocation.
     fn from(s: &CStr) -> CString {
         s.to_owned()
     }