about summary refs log tree commit diff
path: root/src/libstd/ffi
diff options
context:
space:
mode:
authorarcnmx <arcnmx@users.noreply.github.com>2016-02-23 01:36:50 -0500
committerarcnmx <arcnmx@users.noreply.github.com>2016-02-23 10:12:39 -0500
commit9414c4ea18dab870bc0acbcd2be9a882aa17d68e (patch)
treeb16f62d645c0e2ae50f6e1b302e924618cfdd1d9 /src/libstd/ffi
parent16f218b6006faa752925ca5934372c34f1eb2953 (diff)
downloadrust-9414c4ea18dab870bc0acbcd2be9a882aa17d68e.tar.gz
rust-9414c4ea18dab870bc0acbcd2be9a882aa17d68e.zip
Link cstr from_bytes to tracking issue
Diffstat (limited to 'src/libstd/ffi')
-rw-r--r--src/libstd/ffi/c_str.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index e3c51a74b09..f3561622fa3 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -439,7 +439,7 @@ impl CStr {
     /// Creates a C string wrapper from a byte slice.
     ///
     /// This function will cast the provided `bytes` to a `CStr` wrapper after
-    /// ensuring that it is null terminated but does not contain any interior
+    /// ensuring that it is null terminated and does not contain any interior
     /// nul bytes.
     ///
     /// # Examples
@@ -453,8 +453,8 @@ impl CStr {
     /// assert!(cstr.is_some());
     /// # }
     /// ```
-    #[unstable(feature = "cstr_from_bytes", reason = "recently added", issue = "0")]
-    pub fn from_bytes_with_nul<'a>(bytes: &'a [u8]) -> Option<&'a CStr> {
+    #[unstable(feature = "cstr_from_bytes", reason = "recently added", issue = "31190")]
+    pub fn from_bytes_with_nul(bytes: &[u8]) -> Option<&CStr> {
         if bytes.is_empty() || memchr::memchr(0, &bytes) != Some(bytes.len() - 1) {
             None
         } else {
@@ -482,8 +482,8 @@ impl CStr {
     /// }
     /// # }
     /// ```
-    #[unstable(feature = "cstr_from_bytes", reason = "recently added", issue = "0")]
-    pub unsafe fn from_bytes_with_nul_unchecked<'a>(bytes: &'a [u8]) -> &'a CStr {
+    #[unstable(feature = "cstr_from_bytes", reason = "recently added", issue = "31190")]
+    pub unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr {
         mem::transmute(bytes)
     }