]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/str.rs
auto merge of #8308 : blake2-ppc/rust/str-slice-bytes, r=alexcrichton
[rust.git] / src / libstd / str.rs
index 95a411a3f96736009bd2461e6dc137a2656badcf..b4057b85cbfef5cbfae74b54555c359c3e9f5376 100644 (file)
@@ -885,7 +885,7 @@ pub unsafe fn c_str_to_static_slice(s: *libc::c_char) -> &'static str {
     /// If begin is greater than end.
     /// If end is greater than the length of the string.
     #[inline]
-    pub unsafe fn slice_bytes(s: &str, begin: uint, end: uint) -> &str {
+    pub unsafe fn slice_bytes<'a>(s: &'a str, begin: uint, end: uint) -> &'a str {
         do s.as_imm_buf |sbuf, n| {
              assert!((begin <= end));
              assert!((end <= n));