about summary refs log tree commit diff
path: root/src/libstd/ffi
diff options
context:
space:
mode:
authorathulappadan <a4athulappadan@gmail.com>2016-09-11 17:00:09 +0530
committerathulappadan <a4athulappadan@gmail.com>2016-09-11 17:00:09 +0530
commit49e77dbf25ed6526fb5d37c32e55797fb04522f0 (patch)
treec876b159c4833fe3a5f2c91dadb2194d77bfc057 /src/libstd/ffi
parent1fca1ab0e7be574022b2d229f0a6ad9bd580d1bf (diff)
downloadrust-49e77dbf25ed6526fb5d37c32e55797fb04522f0.tar.gz
rust-49e77dbf25ed6526fb5d37c32e55797fb04522f0.zip
Documentation of what does for each type
Diffstat (limited to 'src/libstd/ffi')
-rw-r--r--src/libstd/ffi/c_str.rs1
-rw-r--r--src/libstd/ffi/os_str.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index 38222c014f6..044112ea136 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -339,6 +339,7 @@ impl<'a> Default for &'a CStr {
 
 #[stable(feature = "cstr_default", since = "1.10.0")]
 impl Default for CString {
+    /// Creates a new `CString`, by calling the `Default` of `CStr`, and then owns it.
     fn default() -> CString {
         let a: &CStr = Default::default();
         a.to_owned()
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index 36cf4ef758d..d93d3c73622 100644
--- a/src/libstd/ffi/os_str.rs
+++ b/src/libstd/ffi/os_str.rs
@@ -170,6 +170,7 @@ impl ops::Deref for OsString {
 
 #[stable(feature = "osstring_default", since = "1.9.0")]
 impl Default for OsString {
+    /// Constructs an empty `OsString`.
     #[inline]
     fn default() -> OsString {
         OsString::new()
@@ -342,6 +343,7 @@ impl OsStr {
 
 #[stable(feature = "osstring_default", since = "1.9.0")]
 impl<'a> Default for &'a OsStr {
+    /// Creates an empty `OsStr`.
     #[inline]
     fn default() -> &'a OsStr {
         OsStr::new("")